@nova-design-system/nova-react 3.17.0 → 3.18.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.
Files changed (50) hide show
  1. package/dist/cjs/{index-B0fvq6nd.js → index-_oq_uffl.js} +801 -590
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/{nv-accordion-item.entry-DSXSMuOt.js → nv-accordion-item.entry-DBO7ztqb.js} +1 -1
  4. package/dist/cjs/{nv-accordion.entry-D2GTCEoF.js → nv-accordion.entry-Ma9HqnfE.js} +1 -1
  5. package/dist/cjs/{nv-alert.entry-CxrdJWzE.js → nv-alert.entry--bKp-lux.js} +1 -1
  6. package/dist/cjs/{nv-avatar.entry-Boe2Bp39.js → nv-avatar.entry-DN_-lrBo.js} +1 -1
  7. package/dist/cjs/{nv-badge_2.entry-Cvu8cWAm.js → nv-badge_2.entry-Dl4iJgMU.js} +1 -1
  8. package/dist/cjs/{nv-breadcrumb.entry-IBd49U13.js → nv-breadcrumb.entry-BBvgQ-p_.js} +1 -1
  9. package/dist/cjs/{nv-breadcrumbs.entry-CxDCe3pi.js → nv-breadcrumbs.entry-1SoAvjZG.js} +1 -1
  10. package/dist/cjs/{nv-button.entry-veszqyTF.js → nv-button.entry-B4k5GJIo.js} +1 -1
  11. package/dist/cjs/{nv-buttongroup.entry-BoqH0Kje.js → nv-buttongroup.entry-B5LQavYS.js} +1 -1
  12. package/dist/cjs/{nv-calendar.entry-D-Wl56-6.js → nv-calendar.entry-mOSPsfm-.js} +1 -1
  13. package/dist/cjs/{nv-col.entry-BhKZwFpL.js → nv-col.entry-Dzg7C_6U.js} +1 -1
  14. package/dist/cjs/{nv-datagrid.entry-DnMZbymp.js → nv-datagrid.entry-CfZeMjYO.js} +2 -2
  15. package/dist/cjs/{nv-datagridcolumn.entry-U38uoM6D.js → nv-datagridcolumn.entry-DEqq7_M9.js} +1 -1
  16. package/dist/cjs/{nv-dialog.entry-BF4VplVi.js → nv-dialog.entry-DSX9jRuv.js} +1 -1
  17. package/dist/cjs/{nv-dialogfooter_2.entry-TqO3Mryg.js → nv-dialogfooter_2.entry-t9MuuUDn.js} +1 -1
  18. package/dist/cjs/{nv-fieldcheckbox.entry-C_rJ7Jrf.js → nv-fieldcheckbox.entry-KDMtAaLt.js} +1 -1
  19. package/dist/cjs/{nv-fielddate.entry-DZdztKCP.js → nv-fielddate.entry-SjEKszkJ.js} +1 -1
  20. package/dist/cjs/{nv-fielddaterange.entry-CMxpi6X9.js → nv-fielddaterange.entry-B6pLWuF3.js} +1 -1
  21. package/dist/cjs/{nv-fielddropdown.entry-T-qNo0gM.js → nv-fielddropdown.entry-DIYVOvRw.js} +1 -1
  22. package/dist/cjs/{nv-fielddropdownitem.entry-BfIqaxW3.js → nv-fielddropdownitem.entry-CUMPmEzj.js} +1 -1
  23. package/dist/cjs/{nv-fieldmultiselect.entry-rtKSNZ5F.js → nv-fieldmultiselect.entry-BFt11EM5.js} +1 -1
  24. package/dist/cjs/{nv-fieldnumber.entry-BD-xCdb5.js → nv-fieldnumber.entry-V2AYjG7j.js} +1 -1
  25. package/dist/cjs/{nv-fieldpassword.entry-Dmt91T4y.js → nv-fieldpassword.entry-BoQAgzW2.js} +1 -1
  26. package/dist/cjs/{nv-fieldradio.entry-CAoRufTW.js → nv-fieldradio.entry-CKDZ6g8q.js} +1 -1
  27. package/dist/cjs/{nv-fieldselect.entry-2YLbIpBO.js → nv-fieldselect.entry-Daa3JB5t.js} +1 -1
  28. package/dist/cjs/{nv-fieldslider.entry-D6g_MrUd.js → nv-fieldslider.entry-BhT0C9hG.js} +1 -1
  29. package/dist/cjs/{nv-fieldtext.entry-D-SS4OPR.js → nv-fieldtext.entry-a1x9CfYv.js} +1 -1
  30. package/dist/cjs/{nv-fieldtextarea.entry-L0XDrdHL.js → nv-fieldtextarea.entry-nn5SqAJD.js} +1 -1
  31. package/dist/cjs/nv-fieldtime.entry-DQb9u4eg.js +1076 -0
  32. package/dist/cjs/{nv-icon.entry-B7mLhu0c.js → nv-icon.entry-17nX7627.js} +3 -3
  33. package/dist/cjs/{nv-iconbutton_2.entry-iinBJBb6.js → nv-iconbutton_2.entry-WTj2sSR7.js} +3 -3
  34. package/dist/cjs/{nv-menu.entry-BTW4XauN.js → nv-menu.entry-DnHSkRkc.js} +2 -2
  35. package/dist/cjs/{nv-menuitem.entry-CIT2_Fbe.js → nv-menuitem.entry-BMThBD-z.js} +2 -2
  36. package/dist/cjs/{nv-notification.entry-CVyzCsSh.js → nv-notification.entry-BgORwEc6.js} +2 -2
  37. package/dist/cjs/{nv-notificationcontainer.entry-CqoyGWAa.js → nv-notificationcontainer.entry-C3D52xHp.js} +2 -2
  38. package/dist/cjs/{nv-popover.entry-Bf5ihsdq.js → nv-popover.entry-Bc5Hs_ZA.js} +2 -2
  39. package/dist/cjs/{nv-row.entry-Chp5QzjD.js → nv-row.entry-rTFsRQhn.js} +2 -2
  40. package/dist/cjs/{nv-split.entry-DSB_HMU-.js → nv-split.entry-CEkdVB0d.js} +2 -2
  41. package/dist/cjs/{nv-stack.entry-D6L6830W.js → nv-stack.entry-DFWmiZRf.js} +2 -2
  42. package/dist/cjs/{nv-table.entry-B-UuWaI5.js → nv-table.entry-Drf8wXN5.js} +2 -2
  43. package/dist/cjs/{nv-toggle.entry-AG7sAORg.js → nv-toggle.entry-D3jHT0co.js} +3 -3
  44. package/dist/cjs/{nv-togglebutton.entry-Btlxm5gO.js → nv-togglebutton.entry-zN93TaA9.js} +2 -2
  45. package/dist/cjs/{nv-togglebuttongroup.entry-CM3nWiUU.js → nv-togglebuttongroup.entry-D4dUkodA.js} +2 -2
  46. package/dist/cjs/{nv-tooltip.entry-m4AYXhW3.js → nv-tooltip.entry-DqFRA9_B.js} +2 -2
  47. package/dist/components/NvDatatable.js +122 -19
  48. package/dist/types/components/NvDatatable.d.ts +35 -1
  49. package/package.json +1 -1
  50. package/dist/cjs/nv-fieldtime.entry-Hw5VOmpK.js +0 -1028
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
5
  require('react');
6
6
  require('react-dom');
@@ -124,7 +124,7 @@ const NvIconbutton = class {
124
124
  /****************************************************************************/
125
125
  //#region RENDER
126
126
  render() {
127
- return (index.h(index.Host, { key: '21aa46431d8a9f64cfc6fba04a04b72de31c74a4', role: "button", type: this.type, tabindex: "0", disabled: this.disabled ? true : undefined, class: clsx297c1ffe.clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && index.h("nv-loader", { key: 'c2df9292a9c49f178e6e160dedeac3fe99776322', size: this.size }), !this.loading && index.h("nv-icon", { key: 'b7053d9e3a71a1464b41b021f41fe36c6591f114', name: this.name, size: this.size }), index.h("slot", { key: '70e8576ea565651df7dca6221cfed4160f86f025' })));
127
+ return (index.h(index.Host, { key: '4cda6f8b0c762c08964c5a4a882331d84eaa4514', role: "button", type: this.type, tabindex: "0", disabled: this.disabled ? true : undefined, class: clsx297c1ffe.clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && index.h("nv-loader", { key: 'f433d942bad470a376ef8164e73b7025d15bd39e', size: this.size }), !this.loading && index.h("nv-icon", { key: '1ceebfa6b5907dac279efff65a0f6d977d062453', name: this.name, size: this.size }), index.h("slot", { key: 'd7f882e9c8dc0fcdb1bbb9ff783f7d387036d043' })));
128
128
  }
129
129
  static get formAssociated() { return true; }
130
130
  get el() { return index.getElement(this); }
@@ -155,7 +155,7 @@ const NvLoader = class {
155
155
  //#region RENDER
156
156
  /* <slot> empty to force rendering change */
157
157
  render() {
158
- return (index.h(index.Host, { key: '932c76ef978e21bdab5a3502daadcdd7ecd05af4', class: clsx297c1ffe.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
158
+ return (index.h(index.Host, { key: '4692310e37f31424602a1592cb0648e9bf95a609', class: clsx297c1ffe.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
159
159
  }
160
160
  };
161
161
  NvLoader.style = NvLoaderStyle0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -207,7 +207,7 @@ const NvMenu = class {
207
207
  });
208
208
  }
209
209
  render() {
210
- return (index.h(index.Host, { key: '9c580e2085804dead07f60f3ce4494bed123a58e' }, index.h("slot", { key: '87740cf4b003379eb7a4d011b2b80640e9d7c24f', name: "trigger" }), index.h("nv-popover", { key: '102ebedefdc1b6ac5f10900a82c904b12e4cddb1', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open }, this.items ? (index.h("ul", { slot: "content" }, this.renderMenuItems())) : (index.h("slot", { name: "content" })))));
210
+ return (index.h(index.Host, { key: 'e563f1a78be7cd37b0fe353882cd5874f3a12e60' }, index.h("slot", { key: 'd91afe28b83121707e752532d349fdc9b983ea71', name: "trigger" }), index.h("nv-popover", { key: '90c1fc4e30d9cd7b02bd5ad620b3eb824f82d058', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open }, this.items ? (index.h("ul", { slot: "content" }, this.renderMenuItems())) : (index.h("slot", { name: "content" })))));
211
211
  }
212
212
  get el() { return index.getElement(this); }
213
213
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -50,7 +50,7 @@ const NvMenuitem = class {
50
50
  /****************************************************************************/
51
51
  //#region RENDER
52
52
  render() {
53
- return (index.h(index.Host, { key: '254c76878476b6b22ea2278b86f0608c60a62660', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: 'f7bcdce916a8b0f4026eecd9a6ed060b7f16bcff', name: this.icon }), index.h("slot", { key: '8557bad8db4a35cbe346e7e1e91d4ab1cde9d30b' }), this.label && index.h("span", { key: '1ee543ddfec0e1ff91976ca9739de9f054aa6a5b', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: 'a51ca5b1c20591550e7481228ad4184246a1330e' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: 'f726623c78ea54091f7161c3261db3c22f2d3783', name: "chevron-right" })));
53
+ return (index.h(index.Host, { key: '96933ba797e263a6c56e4b079227498eff19989e', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: '17fd121521b54f2065b91a0921d7a2573139086e', name: this.icon }), index.h("slot", { key: 'e503e3667ee008f6c370d928c2ba0781b1240200' }), this.label && index.h("span", { key: '521f094eb6e3a4015424ef1516a10d6fa454d8ab', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: 'e27628004929e519503dac10f7c278b8a9330176' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: 'c706e459412f628a397f1b4d38010c5de23d643f', name: "chevron-right" })));
54
54
  }
55
55
  get el() { return index.getElement(this); }
56
56
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
5
5
  var collapse_animation6e0b08df = require('./collapse.animation-6e0b08df-AHWzNGm_.js');
6
6
  var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
@@ -253,7 +253,7 @@ const NvNotification = class {
253
253
  //#region RENDER
254
254
  render() {
255
255
  var _a, _b, _c;
256
- return (index.h(index.Host, { key: '6e0b8abd9cbcb62b0b133db77520aa5aaa4173c9', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": (_a = this.getHeadingId()) !== null && _a !== void 0 ? _a : null, "aria-describedby": (_b = this.getMessageId()) !== null && _b !== void 0 ? _b : null, tabindex: "-1" }, index.h("div", { key: '41b2ad35bf5220333e132d61f8843d1136cb1f40', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '63116f239f7108ae945845c247c712827d8ae8a6', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'dc19bf166c6d2eccd3d40384d43206457f0d03f0', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'e673ac1cc78300bc3425018a0cdfc4b90c679796', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: '95cb6ec06d89cda8e5170f9ff0f863b6b0b7e32d', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: 'ed654c0271d2ff8538295d8f7bf58a9754abb4c9', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: '00cc14a709059b9caf2117174ef7fcc310f5965f', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: 'c7c0bcbc2b54fdfdf8280af6a377929bf17fd688', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '946db5aeb667b67f52f51adbb1b8f600325f937e', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: 'd94560b658507a515a1360057121e933b95e6fe6', "data-scope": "actions" }, index.h("slot", { key: 'db185d3924c7d1fbeb30578992f2375e92a0d4bc', name: "actions" })))))));
256
+ return (index.h(index.Host, { key: '6e0908c4dc5bbd289b756703f19e932165da7eeb', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": (_a = this.getHeadingId()) !== null && _a !== void 0 ? _a : null, "aria-describedby": (_b = this.getMessageId()) !== null && _b !== void 0 ? _b : null, tabindex: "-1" }, index.h("div", { key: 'c14fb6bcbfc7048bd1d2171e489e2b1d4a8d3486', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: 'dbc3162958edc2655d59e770b1e27f8226b2a2ec', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: '8ddb1a6ec22c343f5df6158418a4bf434b1d1169', name: "x", size: "sm" }))), index.h("nv-icon", { key: '29e12bb41102cedf3f0b7d8680a265535b69ff23', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: '996b53cdfa47b14769a08d23b9971475521b94e0', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: '110046b680b485d323c49f0836589235aa695ff0', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: 'f256cd10825ee24b4caef51c46ac8e9f7af152c0', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: '73573a91e4cea1acdf12b428f217562eb4df5cf3', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '9bb41cd075367cc9c223ccd4fdb0ff47871941a6', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: '7fff75429d22bf9344f077672c18bfe583e99301', "data-scope": "actions" }, index.h("slot", { key: 'e77b1c3e310db84e3965f097e595f11a8b32ebc3', name: "actions" })))))));
257
257
  }
258
258
  get el() { return index.getElement(this); }
259
259
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -33,7 +33,7 @@ const NvNotificationContainer = class {
33
33
  /****************************************************************************/
34
34
  //#region RENDER
35
35
  render() {
36
- return (index.h(index.Host, { key: 'db4005459b926bcfef55e76f61bff0b5635f2872', class: `position-${this.position}` }, index.h("slot", { key: '518909541ca3e9e82168436a43d5362c414c0ec3' })));
36
+ return (index.h(index.Host, { key: '23a42b8ff4be4ca749656567ad5cbc64bba70466', class: `position-${this.position}` }, index.h("slot", { key: '48a48d6b6e2580f072918192cf59e73cd3dfc1f5' })));
37
37
  }
38
38
  };
39
39
  NvNotificationContainer.style = NvNotificationcontainerStyle0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  var fade_animation9b939939 = require('./fade.animation-9b939939-DV--bM4S.js');
5
5
  var styleValueTypes_esF5d10b79 = require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
6
6
  var events_utilsFe1d907f = require('./events.utils-fe1d907f-01N__3wY.js');
@@ -1974,7 +1974,7 @@ const NvPopover = class {
1974
1974
  /****************************************************************************/
1975
1975
  //#region RENDER
1976
1976
  render() {
1977
- return (index.h(index.Host, { key: '0644e319053ca1f216aac89f5737805008b097be' }, index.h("slot", { key: '7f03080c300378be09e6fce9a44fa2a4a8730f40', name: "trigger" }), index.h("div", { key: '801b7f1dd8c87db5eb06bcabddda8936c89a6ab2', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: 'd8e40589a4c53d4ac0c313f3d97cf61ef928f56d', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: 'af0743b1a94c44dd161712e080dbf54a69c9d4a4', name: "content" }))));
1977
+ return (index.h(index.Host, { key: '8fdb18b1233e2f988d16b85927bbf5b1f7f47630' }, index.h("slot", { key: '3dfc19787da335fa0e6b38fe2aebfa1a9df04ea8', name: "trigger" }), index.h("div", { key: 'd529ca4a2efb62d6bfab679d85acbfb8002e1442', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: 'bb187c48e62a9653af8649c1a0670534499f6060', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: 'b60efb50e864ac0f530fcb7b9fc52c53924f29b1', name: "content" }))));
1978
1978
  }
1979
1979
  get el() { return index.getElement(this); }
1980
1980
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -14,7 +14,7 @@ const NvRow = class {
14
14
  /****************************************************************************/
15
15
  //#region RENDER
16
16
  render() {
17
- return (index.h(index.Host, { key: '9623a4c73a5a2557b2ba7eb346ae0740ca7291c5' }, index.h("slot", { key: '502ea804deec9e91057bfaf6f2fa4fdb4a5822c3' })));
17
+ return (index.h(index.Host, { key: '664375922c55485e6b297f0e64950db684ecffa3' }, index.h("slot", { key: '194e45ce439cadb2bdba17072070d3926a746d3f' })));
18
18
  }
19
19
  };
20
20
  NvRow.style = NvRowStyle0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -324,7 +324,7 @@ const NvSplit = class {
324
324
  /****************************************************************************/
325
325
  //#region RENDER
326
326
  render() {
327
- return (index.h(index.Host, { key: 'e3b158ff1b4f665862079d245c219102d8b8ccda', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: 'baa8105a05bf8446d7a31a23cd5276edb320ea2f', name: "pane" }), index.h("slot", { key: '44afe4f4a220aff45f802218f2618e9305141a9f', name: "gutter" })));
327
+ return (index.h(index.Host, { key: 'b0874368ed8b3c1b5cd0676a1c8181e827369ad7', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: 'a0e35a851390bf1f0ffcf065fdeb23cba3c75c9c', name: "pane" }), index.h("slot", { key: 'a80dbbc4862c3a30aac9e89d6b80a19245083c42', name: "gutter" })));
328
328
  }
329
329
  get el() { return index.getElement(this); }
330
330
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
5
  require('react');
6
6
  require('react-dom');
@@ -23,7 +23,7 @@ const NvStack = class {
23
23
  /****************************************************************************/
24
24
  //#region RENDER
25
25
  render() {
26
- return (index.h(index.Host, { key: '5922efd8652a14d73e812e85dd6770101e22fe46', class: clsx297c1ffe.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '71daf4ee34bd57d785203f98799b6ea7c66ffa3b' })));
26
+ return (index.h(index.Host, { key: '66123f22ad4a6ebefe8663c795274eb900d2c178', class: clsx297c1ffe.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '7b3d395c3490664f0e2f337a04f69cc717ed6c0e' })));
27
27
  }
28
28
  };
29
29
  NvStack.style = NvStackStyle0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -236,7 +236,7 @@ const NvTable = class {
236
236
  /****************************************************************************/
237
237
  //#region RENDER
238
238
  render() {
239
- return (index.h(index.Host, { key: '16b564cc29e8987d8b3fda3a84c0b19882a733bd' }, index.h("slot", { key: '1305cbc6d29caa60df55bfa01a39a3417a27ec01' })));
239
+ return (index.h(index.Host, { key: '37c5e773664fc7bc324d46c003057f322e118c0d' }, index.h("slot", { key: '28decbb3d75da3471a95d9130fdb8206df811270' })));
240
240
  }
241
241
  get host() { return index.getElement(this); }
242
242
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
5
5
  var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
6
6
  require('react');
@@ -66,8 +66,8 @@ const NvToggle = class {
66
66
  /****************************************************************************/
67
67
  //#region RENDER
68
68
  render() {
69
- return (index.h(index.Host, { key: '0f440b59ac0c32d9abe9577668d7045081819b49', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '4289435e34eb31a8e59e00cefcba2e17e98bd03a', class: "input-container" }, index.h("input", { key: '1b7d05f77fd32cece9eed2e6cf79c7e2e707f64c', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '6d78d7e80eb790bbead21bba6108329f9ded3746', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '524a2c2542a45945bddb688c5dff6c9426d58570', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '59eda4b826602062620e7167acf3c8de0f77ebef', name: "label" }, this.label))), (this.description ||
70
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '6e8412879ed60fc6806464432348bd52483e3567', class: "description" }, index.h("slot", { key: '85a876130569a5a4051e271eaf1cf49593a014a6', name: "description" }, this.description))))));
69
+ return (index.h(index.Host, { key: '3e1eecaddeab51801343663989a1554ae62794be', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: 'a67b9c8c0159d6b2a1f87d06d536116475fd9683', class: "input-container" }, index.h("input", { key: '2ce5d01313da8fe74cdac78616c051236aa3102e', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '0e7e1960fc3cd8ff1c79b3c8d4fc306e2b761bfc', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '0325700fc58d39878821a4b1871cb433eda18199', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '4b627dbbad2f52446a0ebb4eacdfe3d6d5ccdbb0', name: "label" }, this.label))), (this.description ||
70
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'db7d0a200c66e234142b455686afdd409337b336', class: "description" }, index.h("slot", { key: '171bb20b639a07bda52cb788fb367a51d6dbe7f8', name: "description" }, this.description))))));
71
71
  }
72
72
  static get formAssociated() { return true; }
73
73
  get el() { return index.getElement(this); }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -48,7 +48,7 @@ const NvTogglebutton = class {
48
48
  /****************************************************************************/
49
49
  //#region RENDER
50
50
  render() {
51
- return (index.h(index.Host, { key: 'b9e37fc1cb34272bca476c7b61db173ab2a9d238', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: 'cf9cf3445fd93873def1f9fa9cbec46c35600025' })));
51
+ return (index.h(index.Host, { key: '6965d7bd520347f5236cca32ca674875a9a4fd2f', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: '45ddd14b67904252c2e78b6357fbd33790facf23' })));
52
52
  }
53
53
  };
54
54
  NvTogglebutton.style = NvTogglebuttonStyle0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -156,7 +156,7 @@ const NvTogglebuttongroup = class {
156
156
  /****************************************************************************/
157
157
  //#region RENDER
158
158
  render() {
159
- return (index.h(index.Host, { key: '7aad0160ae8e093765ba42649293e27d7b93ab75' }, index.h("slot", { key: '39364122a5e65b1a454bd782a5daacc7edfee8b0' })));
159
+ return (index.h(index.Host, { key: '4e075360c060e6de5af80325f7b91e7573f89b16' }, index.h("slot", { key: '7b361c2d608b17cb91814d279aac842e666fda5a' })));
160
160
  }
161
161
  get el() { return index.getElement(this); }
162
162
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0fvq6nd.js');
3
+ var index = require('./index-_oq_uffl.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
 
@@ -46,7 +46,7 @@ const NvTooltip = class {
46
46
  /****************************************************************************/
47
47
  //#region RENDER
48
48
  render() {
49
- return (index.h(index.Host, { key: '5d5facbf2a0487bda4fbae49913a2cb4f69dcf5a' }, index.h("slot", { key: '91080d347f3473879109f7b0b59b159f5bb5979b' }), index.h("nv-popover", { key: '876e5e2487d1b2b5182e42909a6edeab5b3e9db2', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: 'e30ce16ed27e41dee7359fb44ccba7a780e72d37', slot: "content" }, this.message), index.h("slot", { key: '395c75d7f45bab9aaebf979bd75087058b979350', name: "content" }))));
49
+ return (index.h(index.Host, { key: 'bbf9407ca59c3e6122cbdc7c9e3aefe56b64311d' }, index.h("slot", { key: 'b13ae1307843e66cd018ce204c94147b53a26649' }), index.h("nv-popover", { key: '12d9bdca8d68eff93f6aa80304535df3be127c32', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: '6f4e64e97cc644f9da030e30b1069150c47c2985', slot: "content" }, this.message), index.h("slot", { key: '2b55d3b0c1279ce0a8bf165be1b26fe854e91d47', name: "content" }))));
50
50
  }
51
51
  get el() { return index.getElement(this); }
52
52
  };
@@ -1,7 +1,12 @@
1
- import React, { useMemo } from 'react';
2
- import { flexRender, getCoreRowModel, useReactTable, } from '@tanstack/react-table';
1
+ import React, { useMemo, useState, useEffect, useRef, } from 'react';
2
+ import { flexRender, getCoreRowModel, getPaginationRowModel, useReactTable, } from '@tanstack/react-table';
3
3
  import { NvTable } from '../generated/components';
4
- const NvDatatable = ({ columns, rows, ...htmlProps }) => {
4
+ const NvDatatable = ({ columns, rows, pagination, renderPagination, stickyHeader, ...htmlProps }) => {
5
+ const [paginationState, setPaginationState] = useState({
6
+ pageIndex: 0,
7
+ pageSize: pagination?.initialPageSize || 10,
8
+ });
9
+ const lastRowRef = useRef(null);
5
10
  const tableColumns = useMemo(() => columns
6
11
  .filter((col) => !col.hidden)
7
12
  .map((col) => ({
@@ -24,22 +29,120 @@ const NvDatatable = ({ columns, rows, ...htmlProps }) => {
24
29
  return value;
25
30
  },
26
31
  })), [columns]);
27
- const table = useReactTable({
28
- data: rows,
29
- columns: tableColumns,
30
- getCoreRowModel: getCoreRowModel(),
31
- });
32
- return (React.createElement(NvTable, { ...htmlProps },
33
- React.createElement("table", null,
34
- React.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map((header) => (React.createElement("th", { key: header.id, "data-testid": `datatable-header-${header.id}`, style: {
35
- width: header.column.columnDef.size + 'px',
36
- }, "data-no-resize": header.column.columnDef.enableResizing ? null : true }, header.isPlaceholder
37
- ? null
38
- : flexRender(header.column.columnDef.header, header.getContext())))))))),
39
- React.createElement("tbody", null, table.getRowModel().rows.map((row) => (React.createElement("tr", { key: row.id, "data-testid": `datatable-row-${row.id}` }, row.getVisibleCells().map((cell) => (React.createElement("td", { key: cell.id, "data-testid": `datatable-cell-${cell.id}`, style: {
40
- padding: '8px',
41
- borderBottom: '1px solid #eee',
42
- } }, flexRender(cell.column.columnDef.cell, cell.getContext())))))))))));
32
+ const tableConfig = useMemo(() => {
33
+ const baseConfig = {
34
+ data: rows,
35
+ columns: tableColumns,
36
+ getCoreRowModel: getCoreRowModel(),
37
+ };
38
+ if (!pagination) {
39
+ return baseConfig;
40
+ }
41
+ if (pagination.mode === 'client') {
42
+ return {
43
+ ...baseConfig,
44
+ getPaginationRowModel: getPaginationRowModel(),
45
+ initialState: {
46
+ pagination: {
47
+ pageIndex: 0,
48
+ pageSize: pagination.initialPageSize || 10,
49
+ },
50
+ },
51
+ };
52
+ }
53
+ if (pagination.mode === 'server') {
54
+ const pageSize = paginationState.pageSize;
55
+ let pageCount = -1;
56
+ if (pagination.totalPageCount !== undefined) {
57
+ pageCount = pagination.totalPageCount;
58
+ }
59
+ else if (pagination.totalRowCount !== undefined) {
60
+ pageCount = Math.ceil(pagination.totalRowCount / pageSize);
61
+ }
62
+ return {
63
+ ...baseConfig,
64
+ manualPagination: true,
65
+ pageCount,
66
+ state: {
67
+ pagination: paginationState,
68
+ },
69
+ onPaginationChange: setPaginationState,
70
+ };
71
+ }
72
+ return baseConfig;
73
+ }, [rows, tableColumns, pagination, paginationState]);
74
+ const table = useReactTable(tableConfig);
75
+ useEffect(() => {
76
+ if (pagination?.mode === 'server' && pagination.onPaginationChange) {
77
+ pagination.onPaginationChange({
78
+ pageIndex: paginationState.pageIndex,
79
+ pageSize: paginationState.pageSize,
80
+ });
81
+ }
82
+ }, [paginationState, pagination]);
83
+ useEffect(() => {
84
+ if (pagination?.mode !== 'infinite' || !lastRowRef.current) {
85
+ return;
86
+ }
87
+ const threshold = pagination.loadMoreThreshold || 500;
88
+ const observer = new IntersectionObserver((entries) => {
89
+ const entry = entries[0];
90
+ if (entry.isIntersecting &&
91
+ pagination.hasMore &&
92
+ !pagination.isLoading &&
93
+ pagination.onLoadMore) {
94
+ pagination.onLoadMore();
95
+ }
96
+ }, {
97
+ rootMargin: `${threshold}px`,
98
+ root: null,
99
+ });
100
+ observer.observe(lastRowRef.current);
101
+ return () => {
102
+ observer.disconnect();
103
+ };
104
+ }, [rows, pagination]);
105
+ const tablePaginationState = table.getState().pagination;
106
+ const paginationAPI = useMemo(() => {
107
+ if (!pagination) {
108
+ return null;
109
+ }
110
+ const pageCount = table.getPageCount();
111
+ const rowCount = pagination.mode === 'server'
112
+ ? pagination.totalRowCount || rows.length
113
+ : rows.length;
114
+ return {
115
+ pageIndex: tablePaginationState.pageIndex,
116
+ pageSize: tablePaginationState.pageSize,
117
+ pageCount,
118
+ rowCount,
119
+ firstPage: () => table.setPageIndex(0),
120
+ previousPage: () => table.previousPage(),
121
+ nextPage: () => table.nextPage(),
122
+ lastPage: () => table.setPageIndex(pageCount - 1),
123
+ setPageIndex: (index) => table.setPageIndex(index),
124
+ setPageSize: (size) => table.setPageSize(size),
125
+ canPreviousPage: table.getCanPreviousPage(),
126
+ canNextPage: table.getCanNextPage(),
127
+ isLoading: pagination.mode === 'infinite' ? pagination.isLoading : undefined,
128
+ hasMore: pagination.mode === 'infinite' ? pagination.hasMore : undefined,
129
+ };
130
+ }, [pagination, table, rows.length, tablePaginationState]);
131
+ const tableRows = table.getRowModel().rows;
132
+ const isInfiniteScroll = pagination?.mode === 'infinite';
133
+ return (React.createElement(React.Fragment, null,
134
+ React.createElement(NvTable, { ...htmlProps },
135
+ React.createElement("table", null,
136
+ React.createElement("thead", { "data-sticky-top": stickyHeader ? 'true' : undefined }, table.getHeaderGroups().map((headerGroup) => (React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map((header) => (React.createElement("th", { key: header.id, "data-testid": `datatable-header-${header.id}`, style: {
137
+ width: header.column.columnDef.size + 'px',
138
+ }, "data-no-resize": header.column.columnDef.enableResizing ? null : true }, header.isPlaceholder
139
+ ? null
140
+ : flexRender(header.column.columnDef.header, header.getContext())))))))),
141
+ React.createElement("tbody", null, tableRows.map((row, index) => {
142
+ const isLastRow = isInfiniteScroll && index === tableRows.length - 1;
143
+ return (React.createElement("tr", { key: row.id, "data-testid": `datatable-row-${row.id}`, ref: isLastRow ? lastRowRef : undefined }, row.getVisibleCells().map((cell) => (React.createElement("td", { key: cell.id, "data-testid": `datatable-cell-${cell.id}` }, flexRender(cell.column.columnDef.cell, cell.getContext()))))));
144
+ })))),
145
+ paginationAPI && renderPagination && renderPagination(paginationAPI)));
43
146
  };
44
147
  NvDatatable.displayName = 'NvDatatable';
45
148
  export { NvDatatable };
@@ -1,13 +1,47 @@
1
1
  import React, { type ComponentProps } from 'react';
2
2
  declare const NvDatatable: {
3
- <T extends NvDatatableRow = NvDatatableRow>({ columns, rows, ...htmlProps }: NvDatatableProps<T>): React.JSX.Element;
3
+ <T extends NvDatatableRow = NvDatatableRow>({ columns, rows, pagination, renderPagination, stickyHeader, ...htmlProps }: NvDatatableProps<T>): React.JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export { NvDatatable };
7
7
  export type NvDatatableProps<T> = {
8
8
  columns: Array<NvDatatableColumn<T>>;
9
9
  rows: Array<T>;
10
+ pagination?: NvDatatablePaginationConfig;
11
+ renderPagination?: (api: NvDatatableRenderPaginationAPI) => React.ReactNode;
12
+ stickyHeader?: boolean;
10
13
  } & Pick<ComponentProps<'div'>, 'className' | 'style'>;
14
+ export interface NvDatatablePaginationConfig {
15
+ mode: 'client' | 'server' | 'infinite';
16
+ initialPageSize?: number;
17
+ pageSizeOptions?: number[];
18
+ totalRowCount?: number;
19
+ totalPageCount?: number;
20
+ onPaginationChange?: (state: {
21
+ pageIndex: number;
22
+ pageSize: number;
23
+ }) => void;
24
+ hasMore?: boolean;
25
+ isLoading?: boolean;
26
+ loadMoreThreshold?: number;
27
+ onLoadMore?: () => void;
28
+ }
29
+ export interface NvDatatableRenderPaginationAPI {
30
+ pageIndex: number;
31
+ pageSize: number;
32
+ pageCount: number;
33
+ rowCount: number;
34
+ firstPage: () => void;
35
+ previousPage: () => void;
36
+ nextPage: () => void;
37
+ lastPage: () => void;
38
+ setPageIndex: (index: number) => void;
39
+ setPageSize: (size: number) => void;
40
+ canPreviousPage: boolean;
41
+ canNextPage: boolean;
42
+ isLoading?: boolean;
43
+ hasMore?: boolean;
44
+ }
11
45
  export interface NvDatatableColumn<T> {
12
46
  field: keyof T;
13
47
  headerName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nova-design-system/nova-react",
3
- "version": "3.17.0",
3
+ "version": "3.18.0",
4
4
  "description": "Nova is a design system created by Elia Group to empower creators to efficiently build solutions that people love to use.",
5
5
  "author": "Elia Group",
6
6
  "homepage": "https://nova.eliagroup.io",