@nova-design-system/nova-react 3.25.0 → 3.27.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 (72) hide show
  1. package/dist/cjs/generated/components.server.js +21 -1
  2. package/dist/cjs/{index-DUlunl9a.js → index-clzdrCkN.js} +270 -253
  3. package/dist/cjs/index.js +2 -1
  4. package/dist/cjs/{nv-accordion-item.entry-CqnjIt4R.js → nv-accordion-item.entry-Gn0QFETn.js} +1 -1
  5. package/dist/cjs/{nv-accordion.entry-Dx7FmGg_.js → nv-accordion.entry-BooppL5C.js} +1 -1
  6. package/dist/cjs/{nv-alert.entry-BL3Pdcxd.js → nv-alert.entry-CDmHhq86.js} +1 -1
  7. package/dist/cjs/{nv-avatar.entry-2dFR4I9_.js → nv-avatar.entry-pYMjQvxK.js} +1 -1
  8. package/dist/cjs/{nv-badge_2.entry-5FShR2Ax.js → nv-badge_2.entry-BneUUyR7.js} +6 -4
  9. package/dist/cjs/{nv-breadcrumb.entry-Cfi32bBT.js → nv-breadcrumb.entry-B7CGcJ_l.js} +2 -2
  10. package/dist/cjs/{nv-breadcrumbs.entry-BSgn3KUO.js → nv-breadcrumbs.entry-BNKz4ehX.js} +2 -2
  11. package/dist/cjs/{nv-button.entry-BdQQ_LE7.js → nv-button.entry-DDCkNY_S.js} +2 -2
  12. package/dist/cjs/{nv-buttongroup.entry-BM8CwXFK.js → nv-buttongroup.entry-Bio-SWcx.js} +3 -3
  13. package/dist/cjs/{nv-calendar.entry-CeKsMGOa.js → nv-calendar.entry-BoNFEz6W.js} +3 -12
  14. package/dist/cjs/{nv-col.entry-D-h2PGcz.js → nv-col.entry-BHTqFTHl.js} +2 -2
  15. package/dist/cjs/{nv-datagrid.entry-nOBIfqOS.js → nv-datagrid.entry-Bw_sqaMu.js} +3 -3
  16. package/dist/cjs/{nv-datagridcolumn.entry-BAzTU_KM.js → nv-datagridcolumn.entry-Z-RXn3ak.js} +2 -2
  17. package/dist/cjs/{nv-dialog.entry-Bi2ZVSe2.js → nv-dialog.entry-ByZkK4F9.js} +16 -3
  18. package/dist/cjs/{nv-dialogfooter_2.entry-D6lzC-3S.js → nv-dialogfooter_2.entry-Bddcz6HA.js} +3 -3
  19. package/dist/cjs/{nv-drawer.entry-Dp4AfBiF.js → nv-drawer.entry-660dihzy.js} +2 -2
  20. package/dist/cjs/{nv-drawerfooter_2.entry-DpWSsq6d.js → nv-drawerfooter_2.entry-D6EA-3-u.js} +3 -3
  21. package/dist/cjs/{nv-fieldcheckbox.entry-COA3LXnX.js → nv-fieldcheckbox.entry-Bm6qurcS.js} +6 -6
  22. package/dist/cjs/{nv-fielddate.entry-B8r5RFXd.js → nv-fielddate.entry-DW9RQ_dD.js} +7 -7
  23. package/dist/cjs/{nv-fielddaterange.entry-C6_Kq93P.js → nv-fielddaterange.entry-m3dY0P2v.js} +7 -8
  24. package/dist/cjs/{nv-fielddropdown.entry-B2Dr5zHd.js → nv-fielddropdown.entry-DkARzQix.js} +21 -21
  25. package/dist/cjs/{nv-fielddropdownitem.entry-DapivVnR.js → nv-fielddropdownitem.entry-DKG1bO2H.js} +2 -2
  26. package/dist/cjs/{nv-fieldmultiselect.entry-DSpQeiPx.js → nv-fieldmultiselect.entry-B4As0NxI.js} +17 -17
  27. package/dist/cjs/{nv-fieldnumber.entry-BwxR9sRr.js → nv-fieldnumber.entry-DHBPKUcr.js} +5 -5
  28. package/dist/cjs/{nv-fieldpassword.entry-BOSU-Skh.js → nv-fieldpassword.entry-DxEaIvRh.js} +5 -5
  29. package/dist/cjs/nv-fieldradio.entry-MSrPlSzv.js +105 -0
  30. package/dist/cjs/{nv-fieldselect.entry-CfWjQAd9.js → nv-fieldselect.entry-qMAtqdcr.js} +6 -6
  31. package/dist/cjs/{nv-fieldslider.entry-dDPcWUxs.js → nv-fieldslider.entry-CHdMG-lt.js} +4 -4
  32. package/dist/cjs/{nv-fieldtext.entry-Yaa-mkjJ.js → nv-fieldtext.entry-tbYFUJP9.js} +5 -5
  33. package/dist/cjs/{nv-fieldtextarea.entry-Dp_l2pKZ.js → nv-fieldtextarea.entry-D7b3-4Ar.js} +31 -29
  34. package/dist/cjs/{nv-fieldtime.entry-CWxi4Uel.js → nv-fieldtime.entry-TSPljEeW.js} +4 -4
  35. package/dist/cjs/{nv-icon.entry-Dci11W9S.js → nv-icon.entry-BtmsouTL.js} +3 -3
  36. package/dist/cjs/{nv-iconbutton_2.entry-A6FKFJT_.js → nv-iconbutton_2.entry-Ch0rfD12.js} +3 -3
  37. package/dist/cjs/{nv-menu.entry-BHaYP-9M.js → nv-menu.entry-BKLyCbyy.js} +2 -2
  38. package/dist/cjs/{nv-menuitem.entry-Cm1vvN25.js → nv-menuitem.entry-BBK6uQav.js} +2 -2
  39. package/dist/cjs/{nv-notification-bullet.entry-DRlS3Ybc.js → nv-notification-bullet.entry-Dk0oaUTe.js} +1 -1
  40. package/dist/cjs/{nv-notification.entry-BeDmR-XC.js → nv-notification.entry-DVUXuj9T.js} +2 -2
  41. package/dist/cjs/{nv-notificationcontainer.entry-C3p_87Dg.js → nv-notificationcontainer.entry-BQbB0vJ8.js} +2 -2
  42. package/dist/cjs/nv-pagination-nav.entry-BON8ve70.js +201 -0
  43. package/dist/cjs/{nv-paginationtable.entry-BzEqQOBa.js → nv-paginationtable.entry-pT2Qx3xY.js} +2 -2
  44. package/dist/cjs/{nv-popover.entry-D2oFn9vL.js → nv-popover.entry-91VegZzi.js} +2 -2
  45. package/dist/cjs/{nv-row.entry-hV1kxmrr.js → nv-row.entry-C_75GYAm.js} +2 -2
  46. package/dist/cjs/{nv-sidebar.entry-BJrqJ8K7.js → nv-sidebar.entry-XIcDybjF.js} +2 -2
  47. package/dist/cjs/{nv-sidebarcontent.entry-CPfGF7nx.js → nv-sidebarcontent.entry-JSf1Mb0x.js} +2 -2
  48. package/dist/cjs/{nv-sidebardivider.entry-D2wmzHCO.js → nv-sidebardivider.entry-XZ1hYAgj.js} +2 -2
  49. package/dist/cjs/{nv-sidebarfooter.entry-C7fqCzjH.js → nv-sidebarfooter.entry-BHO9gh6y.js} +2 -2
  50. package/dist/cjs/{nv-sidebargroup.entry-qkXnxhs_.js → nv-sidebargroup.entry-DAb7dWFF.js} +2 -2
  51. package/dist/cjs/{nv-sidebarheader.entry-DBsOmyQ0.js → nv-sidebarheader.entry-BksZP_km.js} +2 -2
  52. package/dist/cjs/{nv-sidebarlogo.entry-902Ht3UR.js → nv-sidebarlogo.entry-BntEWmH_.js} +2 -2
  53. package/dist/cjs/{nv-sidebarnavitem.entry-CICrllp8.js → nv-sidebarnavitem.entry-DSu34C34.js} +12 -5
  54. package/dist/cjs/{nv-sidebarnavsubitem.entry-Q9jjU_7D.js → nv-sidebarnavsubitem.entry-Y8Ex0_Lr.js} +2 -2
  55. package/dist/cjs/{nv-split.entry-BYIsE2wp.js → nv-split.entry-BDr6FxCd.js} +2 -2
  56. package/dist/cjs/{nv-stack.entry-DgE5ASGH.js → nv-stack.entry-CChjKrA3.js} +2 -2
  57. package/dist/cjs/{nv-table.entry-DHXBu2n1.js → nv-table.entry-CfqHpj1L.js} +4 -2
  58. package/dist/cjs/{nv-tableheader.entry-BijgOxcO.js → nv-tableheader.entry-C61xO9Ra.js} +2 -2
  59. package/dist/cjs/nv-toggle.entry-B0HofO36.js +82 -0
  60. package/dist/cjs/{nv-togglebutton.entry-DAPETEmF.js → nv-togglebutton.entry-CzyNiZyK.js} +2 -2
  61. package/dist/cjs/{nv-togglebuttongroup.entry-CzDI1XCr.js → nv-togglebuttongroup.entry-TizvIVlB.js} +2 -2
  62. package/dist/cjs/{nv-tooltip.entry-DPoUP9iL.js → nv-tooltip.entry-0kcGcQZo.js} +3 -3
  63. package/dist/generated/components.js +8 -0
  64. package/dist/generated/components.server.js +20 -1
  65. package/dist/providers/NotificationProvider.js +9 -8
  66. package/dist/types/components/NvDatatable/types.d.ts +1 -0
  67. package/dist/types/generated/components.d.ts +6 -1
  68. package/dist/types/generated/components.server.d.ts +6 -1
  69. package/package.json +7 -4
  70. package/dist/cjs/nv-fieldradio.entry-ZFafNY5_.js +0 -105
  71. package/dist/cjs/nv-toggle.entry-CMI1WdvV.js +0 -82
  72. /package/dist/cjs/{i18n.utils-IlwlcG9l-ku0bScip.js → i18n.utils-CR9MpYzU-ku0bScip.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUlunl9a.js');
3
+ var index = require('./index-clzdrCkN.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -116,6 +116,8 @@ function releasePointerCapture(cell, pointerId) {
116
116
  * @param {boolean} prevent - Whether to prevent selection
117
117
  */
118
118
  function setUserSelectPrevention(prevent) {
119
+ if (!document)
120
+ return; // SSR & node env fallback safety
119
121
  document.body.style.userSelect = prevent ? 'none' : '';
120
122
  }
121
123
  /**
@@ -234,7 +236,7 @@ const NvTable = class {
234
236
  /****************************************************************************/
235
237
  //#region RENDER
236
238
  render() {
237
- return (index.h(index.Host, { key: 'c6bb094eb2c2300af460f9acd91a8a5121958ded' }, index.h("slot", { key: 'de523656c119a6338558c48cf46ea25df9c446fd' })));
239
+ return (index.h(index.Host, { key: '43a288ca58eb82de6308dd98ac30abb3fc971f1e' }, index.h("slot", { key: '3a0b986f015777d2ca95b8ce7aebab7133b5d054' })));
238
240
  }
239
241
  get host() { return index.getElement(this); }
240
242
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUlunl9a.js');
3
+ var index = require('./index-clzdrCkN.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -62,7 +62,7 @@ const NvTableheader = class {
62
62
  /****************************************************************************/
63
63
  //#region RENDER
64
64
  render() {
65
- return (index.h(index.Host, { key: 'f704401884c7620a37c932f1aba53c5587e3c0c3', role: "columnheader", "aria-sort": this.ariaSort, tabindex: this.sortable ? 0 : undefined, onKeyDown: this.handleKeyDown.bind(this), onClick: this.cycleSortDirection.bind(this) }, index.h("slot", { key: 'e4fce0b4226dde922d621abf7fbf76efa6b0ceeb' }), this.sortable && (index.h("span", { key: '25cf7526f27eb5e4621434bdadcf169ef60811ab', class: "sort-icon-wrap", "aria-hidden": "true" }, index.h("nv-iconbutton", { key: '39745ade1343e6d1e339b4d451abc3a69d644913', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
65
+ return (index.h(index.Host, { key: '809cf43ff3c9d3977a60a30e350fe6f4457c39f4', role: "columnheader", "aria-sort": this.ariaSort, tabindex: this.sortable ? 0 : undefined, onKeyDown: this.handleKeyDown.bind(this), onClick: this.cycleSortDirection.bind(this) }, index.h("slot", { key: 'ba569a25aa09bb3b18d39e463474698efe6cff40' }), this.sortable && (index.h("span", { key: '77a948313d5dfc746c142eaf448df609ae0bf2b3', class: "sort-icon-wrap", "aria-hidden": "true" }, index.h("nv-iconbutton", { key: 'f18fa1d05c5d4eac8c057a7f350c270eaacc7055', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
66
66
  // prevent mousedown from selecting text
67
67
  onMouseDown: (e) => e.preventDefault(), class: {
68
68
  'is-none': this.sortDirection === 'none',
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-clzdrCkN.js');
4
+ var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
+ var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
6
+ require('@stencil/react-output-target/runtime');
7
+ require('react');
8
+ require('react-dom');
9
+
10
+ const nvToggleCss = () => `@charset "UTF-8";nv-toggle{display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-toggle:not([disabled],[readonly]) input,nv-toggle:not([disabled],[readonly]) label{cursor:pointer}nv-toggle.label-placement-before{flex-direction:row-reverse}nv-toggle[disabled]{opacity:0.5}nv-toggle label{align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-toggle label.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-toggle .input-container{position:relative;color:var(--components-form-shape-foreground-default)}nv-toggle .input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--components-form-shape-foreground-disabled)}nv-toggle .input-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-toggle-width);height:var(--form-toggle-height);flex-direction:column;align-items:flex-start;border-radius:var(--form-toggle-radius);border-width:var(--form-toggle-border-width);border-style:solid;border-color:var(--components-toggle-border-default);background:var(--components-toggle-background-default)}nv-toggle .input-container input[type=checkbox]::after{content:"";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:25%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:hover{border-color:var(--components-toggle-border-hover)}nv-toggle .input-container input[type=checkbox]:hover::after{background-color:var(--components-toggle-shape-hover)}nv-toggle .input-container input[type=checkbox]:focus{border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:focus::after{background-color:var(--components-toggle-shape-default)}nv-toggle .input-container input[type=checkbox]:focus,nv-toggle .input-container input[type=checkbox]:focus-within{outline:none}nv-toggle .input-container input[type=checkbox]:focus-visible,nv-toggle .input-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-toggle .input-container input[type=checkbox]:checked{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:checked::after{content:"";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default-checked);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:75%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:checked:focus{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]){box-shadow:unset;background:var(--components-toggle-background-disabled);border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked{background:var(--components-toggle-background-disabled-checked);border-color:var(--components-toggle-border-disabled-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked::after{background-color:var(--components-toggle-shape-disabled-checked)}@media print{nv-toggle .input-container input[type=checkbox]::after{content:"●";top:calc(50% - 3.5px);width:auto;height:auto;background:none;color:var(--components-toggle-border-default);font-size:calc(var(--form-toggle-switch-dot-default) * 3);line-height:1}nv-toggle .input-container input[type=checkbox]:checked{background:transparent;border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:checked::after{content:"●";top:calc(50% - 3.5px);width:auto;height:auto;left:75%;background:none;color:var(--components-toggle-border-default-checked)}}nv-toggle .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:450;line-height:var(--form-description-line-height)}nv-toggle .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}`;
11
+
12
+ const NvToggle = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.checkedChanged = index.createEvent(this, "checkedChanged", 3);
16
+ /****************************************************************************/
17
+ //#region PROPERTIES
18
+ /**
19
+ * Sets the ID for the radio button’s input element and the for attribute of
20
+ * the associated label. If no ID is provided, a random one will be
21
+ * automatically generated to ensure unique identification, facilitating
22
+ * proper label association and accessibility.
23
+ */
24
+ this.inputId = v4BdYh22OP.v4();
25
+ /**
26
+ * Hides the label visually while still keeping it available for screen
27
+ * readers.
28
+ */
29
+ this.hideLabel = false;
30
+ /** Indicates whether the toggle is checked or not. */
31
+ this.checked = false;
32
+ /** Disables the toggle, preventing user interaction. */
33
+ this.disabled = false;
34
+ /**
35
+ * Sets the toggle to read-only, preventing user changes but still allowing
36
+ * focus and selection of text.
37
+ */
38
+ this.readonly = false;
39
+ }
40
+ //#endregion EVENTS
41
+ /****************************************************************************/
42
+ //#region WATCHERS
43
+ /**
44
+ * Watches for changes to the checked state and emits the new value.
45
+ * @param {boolean} checked - The new value of the checked state.
46
+ */
47
+ onCheckedChanged(checked) {
48
+ this.checkedChanged.emit(checked);
49
+ }
50
+ /**
51
+ * Listens for the change event on the toggle input element and updates the checked state.
52
+ * the checked state of the host elements.
53
+ * @param {Event} event - The change event.
54
+ */
55
+ handleChange(event) {
56
+ const target = event.target;
57
+ if (target.type === 'checkbox' && target.id === this.inputId) {
58
+ if (this.readonly || this.disabled) {
59
+ event.preventDefault();
60
+ return;
61
+ }
62
+ this.checked = target.checked;
63
+ }
64
+ }
65
+ //#endregion WATCHERS
66
+ /****************************************************************************/
67
+ //#region RENDER
68
+ render() {
69
+ return (index.h(index.Host, { key: '626c2acc6992a641c5fd94509fd0ef171fd6d1c6', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: 'a9e4b73d740032520f6094bcada1f835b4bac16c', class: "input-container" }, index.h("input", { key: '1856dfa88421fecee06bdf098dcad22e69f34c00', 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: '4c46bc519d38a66fdecf75cb15caf6d577d92856', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'fd61979a72a2b4e3254987beafd4b024fe1c6bae', htmlFor: this.inputId, class: clsxChV9xqsO.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '0e32e3e03ffda0633f881f41d2372a3d92d82f10', name: "label" }, this.label))), (this.description ||
70
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '688d4160a48d85fa5049556de27f0a26f10ec549', class: "description" }, index.h("slot", { key: '006a61b40a49426bc7c70f1fe830aeb38ecdbf3b', name: "description" }, this.description))))));
71
+ }
72
+ static get formAssociated() { return true; }
73
+ get el() { return index.getElement(this); }
74
+ static get watchers() { return {
75
+ "checked": [{
76
+ "onCheckedChanged": 0
77
+ }]
78
+ }; }
79
+ };
80
+ NvToggle.style = nvToggleCss();
81
+
82
+ exports.nv_toggle = NvToggle;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUlunl9a.js');
3
+ var index = require('./index-clzdrCkN.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -57,7 +57,7 @@ const NvTogglebutton = class {
57
57
  /****************************************************************************/
58
58
  //#region RENDER
59
59
  render() {
60
- return (index.h(index.Host, { key: '91a6205cf5e2dae56a7826c9882bf2899d31321c', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: 'deea1593ddc2083786e7ff05ce6eafa8daebbee3' })));
60
+ return (index.h(index.Host, { key: 'd619862ae9db76a7ce34b05c4974d40e731a576e', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: '5bb9a32e26c3c404a9d2bab2bf7d573a501296a5' })));
61
61
  }
62
62
  get el() { return index.getElement(this); }
63
63
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUlunl9a.js');
3
+ var index = require('./index-clzdrCkN.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
@@ -156,7 +156,7 @@ const NvTogglebuttongroup = class {
156
156
  /****************************************************************************/
157
157
  //#region RENDER
158
158
  render() {
159
- return (index.h(index.Host, { key: '98d0fd8820da9b6a5911330a0396b66a911352f2' }, index.h("slot", { key: 'aa202371d4d63d127d69a6a199451f3c97a65c86' })));
159
+ return (index.h(index.Host, { key: '93a5693197f8b41b18ecef0132168e7f209ec86a' }, index.h("slot", { key: '3085cde261575115286c295eb416063ef14a7bf2' })));
160
160
  }
161
161
  get el() { return index.getElement(this); }
162
162
  static get watchers() { return {
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUlunl9a.js');
3
+ var index = require('./index-clzdrCkN.js');
4
4
  require('@stencil/react-output-target/runtime');
5
5
  require('react');
6
6
  require('react-dom');
7
7
 
8
- const nvTooltipCss = () => `nv-tooltip{display:inline-block;position:relative;user-select:none}nv-tooltip:has([fluid]:not([fluid=false])){display:block}nv-tooltip nv-popover>[data-scope=popover]{background:var(--components-tooltip-background);color:var(--components-tooltip-text);font-weight:var(--font-weight-medium-emphasis);padding:var(--tooltip-padding-y) var(--tooltip-padding-x);font-size:var(--tooltip-font-size);border-radius:var(--tooltip-radius);border:none;box-shadow:0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1) var(--shadow-spread-lg-1) var(--shadow-color-opacity-1), 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2) var(--shadow-spread-lg-2) var(--shadow-color-opacity-2)}nv-tooltip nv-popover>[data-scope=popover] [data-scope=arrow]{background:var(--components-tooltip-background);box-shadow:none;border:none}`;
8
+ const nvTooltipCss = () => `nv-tooltip{display:inline-block;vertical-align:top;position:relative;user-select:none}nv-tooltip:has([fluid]:not([fluid=false])){display:block}nv-tooltip nv-popover{display:block;height:0;min-height:0;overflow:visible}nv-tooltip nv-popover>[data-scope=popover]{background:var(--components-tooltip-background);color:var(--components-tooltip-text);font-weight:var(--font-weight-medium-emphasis);padding:var(--tooltip-padding-y) var(--tooltip-padding-x);font-size:var(--tooltip-font-size);border-radius:var(--tooltip-radius);border:none;box-shadow:0px var(--shadow-y-axis-lg-1) var(--shadow-blur-lg-1) var(--shadow-spread-lg-1) var(--shadow-color-opacity-1), 0px var(--shadow-y-axis-lg-2) var(--shadow-blur-lg-2) var(--shadow-spread-lg-2) var(--shadow-color-opacity-2)}nv-tooltip nv-popover>[data-scope=popover] [data-scope=arrow]{background:var(--components-tooltip-background);box-shadow:none;border:none}`;
9
9
 
10
10
  const NvTooltip = class {
11
11
  constructor(hostRef) {
@@ -47,7 +47,7 @@ const NvTooltip = class {
47
47
  /****************************************************************************/
48
48
  //#region RENDER
49
49
  render() {
50
- return (index.h(index.Host, { key: '1c21198627166da4ff8ad5c0b9cd600587a46d70' }, index.h("nv-popover", { key: '3dfa32fa4789acba5184fefe39d3b82761ede7cb', ref: el => (this.popoverElement = el), triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay, onOpenChanged: e => this.openChanged.emit(e.detail) }, index.h("p", { key: '6e2c16e5e691c27a59938ffc6c5cb075251505f8', slot: "content" }, this.message), index.h("slot", { key: 'aba5c81f04ebf9a94538d384d39da76d9cb74cc2', name: "content" })), index.h("slot", { key: '03697bd2cba4d042c09ed628ee2276ee243004de', ref: el => (this.defaultSlot = el) })));
50
+ return (index.h(index.Host, { key: 'f01e67c6f67c35beba40681c4bcd109886bbdbcf' }, index.h("nv-popover", { key: '47cd75161715752aeeae29223606e21c617a271a', ref: el => (this.popoverElement = el), triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay, onOpenChanged: e => this.openChanged.emit(e.detail) }, index.h("p", { key: 'fe5b09a6c0e4a67a50c9f43cb8344cee68e197f5', slot: "content" }, this.message), index.h("slot", { key: '4ef23e294baa1d5e60236ffec4a26439610030c1', name: "content" })), index.h("slot", { key: '5d8486923cd7cf99da69f4fa4d319dd5b5999cfa', ref: el => (this.defaultSlot = el) })));
51
51
  }
52
52
  get el() { return index.getElement(this); }
53
53
  };
@@ -41,6 +41,7 @@ import { NvMenuitem as NvMenuitemElement, defineCustomElement as defineNvMenuite
41
41
  import { NvNotificationBullet as NvNotificationBulletElement, defineCustomElement as defineNvNotificationBullet } from "@nova-design-system/nova-webcomponents/dist/components/nv-notification-bullet.js";
42
42
  import { NvNotification as NvNotificationElement, defineCustomElement as defineNvNotification } from "@nova-design-system/nova-webcomponents/dist/components/nv-notification.js";
43
43
  import { NvNotificationcontainer as NvNotificationcontainerElement, defineCustomElement as defineNvNotificationcontainer } from "@nova-design-system/nova-webcomponents/dist/components/nv-notificationcontainer.js";
44
+ import { NvPaginationNav as NvPaginationNavElement, defineCustomElement as defineNvPaginationNav } from "@nova-design-system/nova-webcomponents/dist/components/nv-pagination-nav.js";
44
45
  import { NvPaginationtable as NvPaginationtableElement, defineCustomElement as defineNvPaginationtable } from "@nova-design-system/nova-webcomponents/dist/components/nv-paginationtable.js";
45
46
  import { NvPopover as NvPopoverElement, defineCustomElement as defineNvPopover } from "@nova-design-system/nova-webcomponents/dist/components/nv-popover.js";
46
47
  import { NvRow as NvRowElement, defineCustomElement as defineNvRow } from "@nova-design-system/nova-webcomponents/dist/components/nv-row.js";
@@ -390,6 +391,13 @@ export const NvNotificationcontainer = createComponent({
390
391
  events: {},
391
392
  defineCustomElement: defineNvNotificationcontainer
392
393
  });
394
+ export const NvPaginationNav = createComponent({
395
+ tagName: 'nv-pagination-nav',
396
+ elementClass: NvPaginationNavElement,
397
+ react: React,
398
+ events: { onCurrentPageChanged: 'currentPageChanged' },
399
+ defineCustomElement: defineNvPaginationNav
400
+ });
393
401
  export const NvPaginationtable = createComponent({
394
402
  tagName: 'nv-paginationtable',
395
403
  elementClass: NvPaginationtableElement,
@@ -1,4 +1,4 @@
1
- import * as clientComponents from '@nova-design-system/nova-react';
1
+ import * as clientComponents from '@nova-design-system/nova-react/client';
2
2
  import { createComponent } from '@stencil/react-output-target/ssr';
3
3
  export const serializeShadowRoot = { default: "declarative-shadow-dom" };
4
4
  export const NvAccordion = createComponent({
@@ -656,6 +656,7 @@ export const NvFieldtextarea = createComponent({
656
656
  rows: 'rows',
657
657
  resize: 'resize',
658
658
  autosize: 'autosize',
659
+ maxAutoHeight: 'max-auto-height',
659
660
  autofocus: 'autofocus',
660
661
  fluid: 'fluid'
661
662
  },
@@ -795,6 +796,24 @@ export const NvNotificationcontainer = createComponent({
795
796
  clientModule: clientComponents.NvNotificationcontainer,
796
797
  serializeShadowRoot
797
798
  });
799
+ export const NvPaginationNav = createComponent({
800
+ tagName: 'nv-pagination-nav',
801
+ properties: {
802
+ previousButtonLabel: 'previous-button-label',
803
+ nextButtonLabel: 'next-button-label',
804
+ numStartZoneButtons: 'num-start-zone-buttons',
805
+ numEndZoneButtons: 'num-end-zone-buttons',
806
+ numMiddleButtons: 'num-middle-buttons',
807
+ currentPage: 'current-page',
808
+ totalCount: 'total-count',
809
+ pageSize: 'page-size',
810
+ isOnlyIcon: 'is-only-icon',
811
+ showMiddleZone: 'show-middle-zone'
812
+ },
813
+ hydrateModule: import('@nova-design-system/nova-webcomponents/hydrate'),
814
+ clientModule: clientComponents.NvPaginationNav,
815
+ serializeShadowRoot
816
+ });
798
817
  export const NvPaginationtable = createComponent({
799
818
  tagName: 'nv-paginationtable',
800
819
  properties: {
@@ -91,14 +91,15 @@ export const NotificationProvider = ({ children, position = DEFAULT_POSITION, ma
91
91
  };
92
92
  return (React.createElement(NotificationContext.Provider, { value: contextValue },
93
93
  children,
94
- createPortal(React.createElement(NvNotificationcontainer, { position: position, className: className, "data-testid": "notification-container" }, notifications.map((notification) => (React.createElement(NvNotification, { key: notification.id, uid: notification.id, heading: notification.heading, message: notification.message, dismissible: notification.dismissible, emphasis: notification.emphasis, feedback: notification.feedback, icon: notification.icon, onHiddenChanged: (event) => {
95
- if (event.detail) {
96
- handleNotificationClose(notification.id);
97
- }
98
- }, initiallyHidden: true, ref: notification.ref }, (Boolean(notification.actionSlot) ||
99
- Boolean(notification.actions.length)) && (React.createElement("div", { slot: "actions" },
100
- notification.actions.map((action) => (React.createElement(NvButton, { key: action.label, emphasis: "low", size: "md", onClick: action.onClick }, action.label))),
101
- notification.actionSlot)))))), document.body)));
94
+ typeof document !== 'undefined' &&
95
+ createPortal(React.createElement(NvNotificationcontainer, { position: position, className: className, "data-testid": "notification-container" }, notifications.map((notification) => (React.createElement(NvNotification, { key: notification.id, uid: notification.id, heading: notification.heading, message: notification.message, dismissible: notification.dismissible, emphasis: notification.emphasis, feedback: notification.feedback, icon: notification.icon, onHiddenChanged: (event) => {
96
+ if (event.detail) {
97
+ handleNotificationClose(notification.id);
98
+ }
99
+ }, initiallyHidden: true, ref: notification.ref }, (Boolean(notification.actionSlot) ||
100
+ Boolean(notification.actions.length)) && (React.createElement("div", { slot: "actions" },
101
+ notification.actions.map((action) => (React.createElement(NvButton, { key: action.label, emphasis: "low", size: "md", onClick: action.onClick }, action.label))),
102
+ notification.actionSlot)))))), document.body)));
102
103
  };
103
104
  export const useNotifications = () => {
104
105
  const context = useContext(NotificationContext);
@@ -11,6 +11,7 @@ export type NvDatatableProps<T> = {
11
11
  renderPagination?: (api: NvDatatableRenderPaginationAPI) => React.ReactNode;
12
12
  renderFiltering?: (api: NvDatatableRenderFilteringAPI) => React.ReactNode;
13
13
  stickyHeader?: boolean;
14
+ suppressHydrationWarning?: boolean;
14
15
  } & Pick<ComponentProps<'div'>, 'className' | 'style'>;
15
16
  export interface NvDatatableColumn<Row, K extends keyof Row = keyof Row, F = Row[K]> {
16
17
  field: K;
@@ -1,4 +1,4 @@
1
- import { type NvAccordionCustomEvent, type NvAccordionItemCustomEvent, type NvAlertCustomEvent, type NvBadgeCustomEvent, type NvCalendarCustomEvent, type NvDatagridCustomEvent, type NvDialogCustomEvent, type NvDialogfooterCustomEvent, type NvDrawerCustomEvent, type NvDrawerfooterCustomEvent, type NvFieldcheckboxCustomEvent, type NvFielddateCustomEvent, type NvFielddaterangeCustomEvent, type NvFielddropdownCustomEvent, type NvFielddropdownitemCustomEvent, type NvFielddropdownitemcheckCustomEvent, type NvFieldmultiselectCustomEvent, type NvFieldnumberCustomEvent, type NvFieldpasswordCustomEvent, type NvFieldradioCustomEvent, type NvFieldselectCustomEvent, type NvFieldsliderCustomEvent, type NvFieldtextCustomEvent, type NvFieldtextareaCustomEvent, type NvFieldtimeCustomEvent, type NvMenuCustomEvent, type NvMenuitemCustomEvent, type NvNotificationCustomEvent, type NvPaginationtableCustomEvent, type NvPopoverCustomEvent, type NvSidebarCustomEvent, type NvSplitCustomEvent, type NvTableheaderCustomEvent, type NvToggleCustomEvent, type NvTogglebuttonCustomEvent, type NvTogglebuttongroupCustomEvent, type NvTooltipCustomEvent } from "@nova-design-system/nova-webcomponents";
1
+ import { type NvAccordionCustomEvent, type NvAccordionItemCustomEvent, type NvAlertCustomEvent, type NvBadgeCustomEvent, type NvCalendarCustomEvent, type NvDatagridCustomEvent, type NvDialogCustomEvent, type NvDialogfooterCustomEvent, type NvDrawerCustomEvent, type NvDrawerfooterCustomEvent, type NvFieldcheckboxCustomEvent, type NvFielddateCustomEvent, type NvFielddaterangeCustomEvent, type NvFielddropdownCustomEvent, type NvFielddropdownitemCustomEvent, type NvFielddropdownitemcheckCustomEvent, type NvFieldmultiselectCustomEvent, type NvFieldnumberCustomEvent, type NvFieldpasswordCustomEvent, type NvFieldradioCustomEvent, type NvFieldselectCustomEvent, type NvFieldsliderCustomEvent, type NvFieldtextCustomEvent, type NvFieldtextareaCustomEvent, type NvFieldtimeCustomEvent, type NvMenuCustomEvent, type NvMenuitemCustomEvent, type NvNotificationCustomEvent, type NvPaginationNavCustomEvent, type NvPaginationtableCustomEvent, type NvPopoverCustomEvent, type NvSidebarCustomEvent, type NvSplitCustomEvent, type NvTableheaderCustomEvent, type NvToggleCustomEvent, type NvTogglebuttonCustomEvent, type NvTogglebuttongroupCustomEvent, type NvTooltipCustomEvent } from "@nova-design-system/nova-webcomponents";
2
2
  import { NvAccordionItem as NvAccordionItemElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-accordion-item.js";
3
3
  import { NvAccordion as NvAccordionElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-accordion.js";
4
4
  import { NvAlert as NvAlertElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-alert.js";
@@ -41,6 +41,7 @@ import { NvMenuitem as NvMenuitemElement } from "@nova-design-system/nova-webcom
41
41
  import { NvNotificationBullet as NvNotificationBulletElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-notification-bullet.js";
42
42
  import { NvNotification as NvNotificationElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-notification.js";
43
43
  import { NvNotificationcontainer as NvNotificationcontainerElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-notificationcontainer.js";
44
+ import { NvPaginationNav as NvPaginationNavElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-pagination-nav.js";
44
45
  import { NvPaginationtable as NvPaginationtableElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-paginationtable.js";
45
46
  import { NvPopover as NvPopoverElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-popover.js";
46
47
  import { NvRow as NvRowElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-row.js";
@@ -242,6 +243,10 @@ export type NvNotificationBulletEvents = NonNullable<unknown>;
242
243
  export declare const NvNotificationBullet: StencilReactComponent<NvNotificationBulletElement, NvNotificationBulletEvents>;
243
244
  export type NvNotificationcontainerEvents = NonNullable<unknown>;
244
245
  export declare const NvNotificationcontainer: StencilReactComponent<NvNotificationcontainerElement, NvNotificationcontainerEvents>;
246
+ export type NvPaginationNavEvents = {
247
+ onCurrentPageChanged: EventName<NvPaginationNavCustomEvent<number>>;
248
+ };
249
+ export declare const NvPaginationNav: StencilReactComponent<NvPaginationNavElement, NvPaginationNavEvents>;
245
250
  export type NvPaginationtableEvents = {
246
251
  onPageIndexChanged: EventName<NvPaginationtableCustomEvent<number>>;
247
252
  onPageSizeChanged: EventName<NvPaginationtableCustomEvent<number>>;
@@ -1,4 +1,4 @@
1
- import { type NvAccordionCustomEvent, type NvAccordionItemCustomEvent, type NvAlertCustomEvent, type NvBadgeCustomEvent, type NvCalendarCustomEvent, type NvDatagridCustomEvent, type NvDialogCustomEvent, type NvDialogfooterCustomEvent, type NvDrawerCustomEvent, type NvDrawerfooterCustomEvent, type NvFieldcheckboxCustomEvent, type NvFielddateCustomEvent, type NvFielddaterangeCustomEvent, type NvFielddropdownCustomEvent, type NvFielddropdownitemCustomEvent, type NvFielddropdownitemcheckCustomEvent, type NvFieldmultiselectCustomEvent, type NvFieldnumberCustomEvent, type NvFieldpasswordCustomEvent, type NvFieldradioCustomEvent, type NvFieldselectCustomEvent, type NvFieldsliderCustomEvent, type NvFieldtextCustomEvent, type NvFieldtextareaCustomEvent, type NvFieldtimeCustomEvent, type NvMenuCustomEvent, type NvMenuitemCustomEvent, type NvNotificationCustomEvent, type NvPaginationtableCustomEvent, type NvPopoverCustomEvent, type NvSidebarCustomEvent, type NvSplitCustomEvent, type NvTableheaderCustomEvent, type NvToggleCustomEvent, type NvTogglebuttonCustomEvent, type NvTogglebuttongroupCustomEvent, type NvTooltipCustomEvent } from "@nova-design-system/nova-webcomponents";
1
+ import { type NvAccordionCustomEvent, type NvAccordionItemCustomEvent, type NvAlertCustomEvent, type NvBadgeCustomEvent, type NvCalendarCustomEvent, type NvDatagridCustomEvent, type NvDialogCustomEvent, type NvDialogfooterCustomEvent, type NvDrawerCustomEvent, type NvDrawerfooterCustomEvent, type NvFieldcheckboxCustomEvent, type NvFielddateCustomEvent, type NvFielddaterangeCustomEvent, type NvFielddropdownCustomEvent, type NvFielddropdownitemCustomEvent, type NvFielddropdownitemcheckCustomEvent, type NvFieldmultiselectCustomEvent, type NvFieldnumberCustomEvent, type NvFieldpasswordCustomEvent, type NvFieldradioCustomEvent, type NvFieldselectCustomEvent, type NvFieldsliderCustomEvent, type NvFieldtextCustomEvent, type NvFieldtextareaCustomEvent, type NvFieldtimeCustomEvent, type NvMenuCustomEvent, type NvMenuitemCustomEvent, type NvNotificationCustomEvent, type NvPaginationNavCustomEvent, type NvPaginationtableCustomEvent, type NvPopoverCustomEvent, type NvSidebarCustomEvent, type NvSplitCustomEvent, type NvTableheaderCustomEvent, type NvToggleCustomEvent, type NvTogglebuttonCustomEvent, type NvTogglebuttongroupCustomEvent, type NvTooltipCustomEvent } from "@nova-design-system/nova-webcomponents";
2
2
  import { NvAccordionItem as NvAccordionItemElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-accordion-item.js";
3
3
  import { NvAccordion as NvAccordionElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-accordion.js";
4
4
  import { NvAlert as NvAlertElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-alert.js";
@@ -41,6 +41,7 @@ import { NvMenuitem as NvMenuitemElement } from "@nova-design-system/nova-webcom
41
41
  import { NvNotificationBullet as NvNotificationBulletElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-notification-bullet.js";
42
42
  import { NvNotification as NvNotificationElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-notification.js";
43
43
  import { NvNotificationcontainer as NvNotificationcontainerElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-notificationcontainer.js";
44
+ import { NvPaginationNav as NvPaginationNavElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-pagination-nav.js";
44
45
  import { NvPaginationtable as NvPaginationtableElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-paginationtable.js";
45
46
  import { NvPopover as NvPopoverElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-popover.js";
46
47
  import { NvRow as NvRowElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-row.js";
@@ -244,6 +245,10 @@ export type NvNotificationBulletEvents = NonNullable<unknown>;
244
245
  export declare const NvNotificationBullet: StencilReactComponent<NvNotificationBulletElement, NvNotificationBulletEvents>;
245
246
  export type NvNotificationcontainerEvents = NonNullable<unknown>;
246
247
  export declare const NvNotificationcontainer: StencilReactComponent<NvNotificationcontainerElement, NvNotificationcontainerEvents>;
248
+ export type NvPaginationNavEvents = {
249
+ onCurrentPageChanged: EventName<NvPaginationNavCustomEvent<number>>;
250
+ };
251
+ export declare const NvPaginationNav: StencilReactComponent<NvPaginationNavElement, NvPaginationNavEvents>;
247
252
  export type NvPaginationtableEvents = {
248
253
  onPageIndexChanged: EventName<NvPaginationtableCustomEvent<number>>;
249
254
  onPageSizeChanged: EventName<NvPaginationtableCustomEvent<number>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nova-design-system/nova-react",
3
- "version": "3.25.0",
3
+ "version": "3.27.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",
@@ -19,12 +19,15 @@
19
19
  ".": {
20
20
  "import": "./dist/index.js",
21
21
  "require": "./dist/cjs/index.js",
22
- "types": "./dist/types/index.d.ts",
23
- "node": "./dist/generated/components.server.js"
22
+ "types": "./dist/types/index.d.ts"
24
23
  },
25
24
  "./server": {
26
25
  "import": "./dist/generated/components.server.js",
27
26
  "types": "./dist/types/generated/components.server.d.ts"
27
+ },
28
+ "./client": {
29
+ "import": "./dist/generated/components.js",
30
+ "types": "./dist/types/generated/components.d.ts"
28
31
  }
29
32
  },
30
33
  "publishConfig": {
@@ -40,7 +43,7 @@
40
43
  "tsc:watch": "tsc -p . --outDir ./dist --declarationDir ./dist/types --declaration true --watch",
41
44
  "storybook": "storybook dev -p 6006",
42
45
  "storybook.build": "storybook build -o ../../storybook-static/react",
43
- "clean": "rimraf dist lib/generated lib/stories/generated lib/stories/components/*-migration.mdx lib/stories/components/*-guide.mdx",
46
+ "clean": "rimraf dist lib/generated lib/stories/generated && shx rm -rf lib/stories/components/*-migration.mdx lib/stories/components/*-guide.mdx",
44
47
  "typecheck": "tsc --emitDeclarationOnly false --noEmit"
45
48
  },
46
49
  "dependencies": {
@@ -1,105 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-DUlunl9a.js');
4
- var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
- var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
6
- require('@stencil/react-output-target/runtime');
7
- require('react');
8
- require('react-dom');
9
-
10
- const nvFieldradioCss = () => `nv-fieldradio{--nv-fieldradio-border-default:var(--components-form-field-border-default);--nv-fieldradio-border-hover:var(--components-form-field-border-hover);--nv-fieldradio-border-focus:var(--components-form-field-border-default);--nv-fieldradio-background-default:var(--components-form-field-background-default);--nv-fieldradio-background-checked:var(--components-form-field-background-checked);--nv-fieldradio-background-disabled:var(--components-form-field-background-disabled);--nv-fieldradio-focus-box-shadow:var(--color-focus-brand);--nv-fieldradio-dot-color-checked:var(--components-form-shape-foreground-default);--nv-fieldradio-dot-color-disabled:var(--components-form-shape-foreground-disabled);--nv-fieldradio-outline-color:var(--color-focus-brand);display:inline-flex;align-items:flex-start;gap:var(--form-gap-x)}nv-fieldradio:not([disabled]) input,nv-fieldradio:not([disabled]) label,nv-fieldradio[disabled=false] input,nv-fieldradio[disabled=false] label{cursor:pointer}nv-fieldradio.error{--nv-fieldradio-border-default:var(--components-form-field-border-error);--nv-fieldradio-border-hover:var(--nv-fieldradio-border-default);--nv-fieldradio-border-focus:var(--components-form-field-border-error);--nv-fieldradio-background-checked:var(--components-form-field-background-error);--nv-fieldradio-focus-box-shadow:var(--color-focus-destructive);--nv-fieldradio-dot-color-checked:var(--components-form-shape-foreground-default);--nv-fieldradio-dot-color-disabled:var(--components-form-field-border-error);--nv-fieldradio-outline-color:var(--color-focus-destructive)}nv-fieldradio.label-placement-before{flex-direction:row-reverse}nv-fieldradio[disabled]{opacity:0.5}nv-fieldradio label{align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--form-label-font-weight);line-height:var(--form-label-line-height)}nv-fieldradio input[type=radio]{appearance:none;position:relative;display:flex;width:var(--form-radio-size);height:var(--form-radio-size);padding:var(--form-radio-inner-circle-padding);flex-direction:column;align-items:flex-start;border-radius:var(--radius-rounded-full);border-width:var(--form-radio-border-width);border-style:solid;border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-default)}nv-fieldradio input[type=radio]:hover{border-color:var(--nv-fieldradio-border-hover)}nv-fieldradio input[type=radio]:focus{border-color:var(--nv-fieldradio-border-focus)}nv-fieldradio input[type=radio]:focus,nv-fieldradio input[type=radio]:focus-within{outline:none}nv-fieldradio input[type=radio]:focus-visible,nv-fieldradio input[type=radio]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-fieldradio-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-fieldradio input[type=radio]:checked{background:var(--nv-fieldradio-background-checked);border-color:var(--nv-fieldradio-background-checked)}nv-fieldradio input[type=radio]:checked:hover,nv-fieldradio input[type=radio]:checked:focus{border-color:var(--nv-fieldradio-background-checked);background:var(--nv-fieldradio-background-checked)}nv-fieldradio input[type=radio]:checked::before{content:"";position:absolute;top:50%;right:50%;transform:translate(50%, -50%);left:0;width:var(--form-radio-inner-circle-size);height:var(--form-radio-inner-circle-size);flex-shrink:0;border-radius:var(--radius-rounded-full);background:var(--nv-fieldradio-dot-color-checked)}nv-fieldradio input[type=radio]:disabled{border-radius:var(--radius-rounded-full);border-width:var(--form-radio-border-width);border-style:solid;border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-disabled)}nv-fieldradio input[type=radio]:disabled:checked::before{background:var(--nv-fieldradio-dot-color-disabled)}nv-fieldradio input[type=radio]:disabled:hover{border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-disabled)}nv-fieldradio .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height)}nv-fieldradio .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldradio .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}`;
11
-
12
- const NvFieldradio = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.checkedChanged = index.createEvent(this, "checkedChanged", 3);
16
- /**
17
- * Set the label placement to before the input
18
- * @deprecated use labelPlacement instead.
19
- */
20
- this.labelBefore = false;
21
- //#endregion DEPRECATED
22
- /****************************************************************************/
23
- //#region PROPERTIES
24
- /**
25
- * Sets the ID for the radio button’s input element and the for attribute of
26
- * the associated label. If no ID is provided, a random one will be
27
- * automatically generated to ensure unique identification, facilitating
28
- * proper label association and accessibility.
29
- */
30
- this.inputId = v4BdYh22OP.v4();
31
- /**
32
- * Highlight the radio button with error styling. It helps users quickly
33
- * identify which option needs attention, improving their form-filling
34
- * experience by making issues more visible.
35
- * @validator error
36
- */
37
- this.error = false;
38
- /**
39
- * Controls whether the radio button is selected.
40
- */
41
- this.checked = false;
42
- /**
43
- * Disables the radio button, making it un-selectable.
44
- */
45
- this.disabled = false;
46
- /**
47
- * Applies focus to the input field as soon as the component is mounted. This
48
- * is equivalent to setting the native autofocus attribute on an <input>
49
- * element.
50
- */
51
- this.autofocus = false;
52
- }
53
- componentWillRender() {
54
- if (this.message) {
55
- this.description = this.message;
56
- }
57
- if (this.labelBefore) {
58
- this.labelPlacement = 'before';
59
- }
60
- }
61
- //#endregion EVENTS
62
- /****************************************************************************/
63
- //#region WATCHERS
64
- /**
65
- * Watches for changes to the checked state and emits the new value.
66
- * @param {boolean} checked - The new value of the checked state.
67
- */
68
- handleCheckedChange(checked) {
69
- this.checkedChanged.emit(checked);
70
- }
71
- /**
72
- * Listens for the change event on the radio button input element and controls
73
- * the checked state of the host elements.
74
- * @param {Event} event - The change event.
75
- */
76
- handleChange(event) {
77
- const target = event.target;
78
- if (target?.type === 'radio') {
79
- Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(element => {
80
- if (element.name === this.name) {
81
- element.checked = false;
82
- }
83
- });
84
- this.checked = target.checked;
85
- }
86
- }
87
- //#endregion WATCHERS
88
- /****************************************************************************/
89
- //#region RENDER
90
- render() {
91
- return (index.h(index.Host, { key: 'bae8d6168e0845413655d8b52c14a2c348832616', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("input", { key: '4d3e7cd78625c3d42025f85be66c8f389501d01e', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), index.h("div", { key: '2d12f20bc8c0cf4bd3d31916bfeed8a8ef13de37', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '91b2080433d987def3d2ddf45c9817cc5852ebee', htmlFor: this.inputId }, index.h("slot", { key: '61c2209353903495e30bc86a281b0460a8d1ee2e', name: "label" }, this.label))), (this.description ||
92
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'f33b847894e5ea058ae36bb0fa107c5c28062443', class: "description" }, index.h("slot", { key: '24c4b14000b8dd0738b1c3fdc8c97aebc9f3c03f', name: "description" }, this.description))), (this.errorDescription ||
93
- this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'bcc07ebfaa0d8dcd3c9a813ccd33322096b5aa82', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '7cd0cb86be513924ccd83a3a93e4d8871ac21b7b', name: "error-description" }, this.errorDescription))))));
94
- }
95
- static get formAssociated() { return true; }
96
- get el() { return index.getElement(this); }
97
- static get watchers() { return {
98
- "checked": [{
99
- "handleCheckedChange": 0
100
- }]
101
- }; }
102
- };
103
- NvFieldradio.style = nvFieldradioCss();
104
-
105
- exports.nv_fieldradio = NvFieldradio;
@@ -1,82 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-DUlunl9a.js');
4
- var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
- var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
6
- require('@stencil/react-output-target/runtime');
7
- require('react');
8
- require('react-dom');
9
-
10
- const nvToggleCss = () => `nv-toggle{display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-toggle:not([disabled],[readonly]) input,nv-toggle:not([disabled],[readonly]) label{cursor:pointer}nv-toggle.label-placement-before{flex-direction:row-reverse}nv-toggle[disabled]{opacity:0.5}nv-toggle label{align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-toggle label.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-toggle .input-container{position:relative;color:var(--components-form-shape-foreground-default)}nv-toggle .input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--components-form-shape-foreground-disabled)}nv-toggle .input-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-toggle-width);height:var(--form-toggle-height);flex-direction:column;align-items:flex-start;border-radius:var(--form-toggle-radius);border-width:var(--form-toggle-border-width);border-style:solid;border-color:var(--components-toggle-border-default);background:var(--components-toggle-background-default)}nv-toggle .input-container input[type=checkbox]::after{content:"";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:25%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:hover{border-color:var(--components-toggle-border-hover)}nv-toggle .input-container input[type=checkbox]:hover::after{background-color:var(--components-toggle-shape-hover)}nv-toggle .input-container input[type=checkbox]:focus{border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:focus::after{background-color:var(--components-toggle-shape-default)}nv-toggle .input-container input[type=checkbox]:focus,nv-toggle .input-container input[type=checkbox]:focus-within{outline:none}nv-toggle .input-container input[type=checkbox]:focus-visible,nv-toggle .input-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-toggle .input-container input[type=checkbox]:checked{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:checked::after{content:"";display:block;width:var(--form-toggle-switch-dot-default);height:var(--form-toggle-switch-dot-default);background-color:var(--components-toggle-shape-default-checked);border-radius:var(--radius-rounded-full);position:absolute;top:50%;left:75%;transform:translate(-50%, -50%)}nv-toggle .input-container input[type=checkbox]:checked:focus{background:var(--components-toggle-background-default-checked);border-color:var(--components-toggle-border-default-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]){box-shadow:unset;background:var(--components-toggle-background-disabled);border-color:var(--components-toggle-border-default)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked{background:var(--components-toggle-background-disabled-checked);border-color:var(--components-toggle-border-disabled-checked)}nv-toggle .input-container input[type=checkbox]:disabled:not([readonly]):checked::after{background-color:var(--components-toggle-shape-disabled-checked)}nv-toggle .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:450;line-height:var(--form-description-line-height)}nv-toggle .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}`;
11
-
12
- const NvToggle = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.checkedChanged = index.createEvent(this, "checkedChanged", 3);
16
- /****************************************************************************/
17
- //#region PROPERTIES
18
- /**
19
- * Sets the ID for the radio button’s input element and the for attribute of
20
- * the associated label. If no ID is provided, a random one will be
21
- * automatically generated to ensure unique identification, facilitating
22
- * proper label association and accessibility.
23
- */
24
- this.inputId = v4BdYh22OP.v4();
25
- /**
26
- * Hides the label visually while still keeping it available for screen
27
- * readers.
28
- */
29
- this.hideLabel = false;
30
- /** Indicates whether the toggle is checked or not. */
31
- this.checked = false;
32
- /** Disables the toggle, preventing user interaction. */
33
- this.disabled = false;
34
- /**
35
- * Sets the toggle to read-only, preventing user changes but still allowing
36
- * focus and selection of text.
37
- */
38
- this.readonly = false;
39
- }
40
- //#endregion EVENTS
41
- /****************************************************************************/
42
- //#region WATCHERS
43
- /**
44
- * Watches for changes to the checked state and emits the new value.
45
- * @param {boolean} checked - The new value of the checked state.
46
- */
47
- onCheckedChanged(checked) {
48
- this.checkedChanged.emit(checked);
49
- }
50
- /**
51
- * Listens for the change event on the toggle input element and updates the checked state.
52
- * the checked state of the host elements.
53
- * @param {Event} event - The change event.
54
- */
55
- handleChange(event) {
56
- const target = event.target;
57
- if (target.type === 'checkbox' && target.id === this.inputId) {
58
- if (this.readonly || this.disabled) {
59
- event.preventDefault();
60
- return;
61
- }
62
- this.checked = target.checked;
63
- }
64
- }
65
- //#endregion WATCHERS
66
- /****************************************************************************/
67
- //#region RENDER
68
- render() {
69
- return (index.h(index.Host, { key: '1cc28405c1775d19366fd3a684a834e0ca82cf39', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: 'cc19babb308cb64a8ff359c68eff673d8486b694', class: "input-container" }, index.h("input", { key: '8222a1abe2196b4e943a7adf338df430df2728fe', 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: '46eddca130efc9e6abcef1d6b376281cc1e0544e', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'c9ccfd1fd1e3d896874984943158f9332a7c26b6', htmlFor: this.inputId, class: clsxChV9xqsO.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: 'cd657a7eff81775da798b211f1c0983f18ace953', name: "label" }, this.label))), (this.description ||
70
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'dee3823d764ff864b4f008a43bd0aa8c44b6db13', class: "description" }, index.h("slot", { key: '6dd3815bf94e766b3c3c43be72b6a86ed354987b', name: "description" }, this.description))))));
71
- }
72
- static get formAssociated() { return true; }
73
- get el() { return index.getElement(this); }
74
- static get watchers() { return {
75
- "checked": [{
76
- "onCheckedChanged": 0
77
- }]
78
- }; }
79
- };
80
- NvToggle.style = nvToggleCss();
81
-
82
- exports.nv_toggle = NvToggle;