@nova-design-system/nova-react 3.22.0 → 3.24.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 (91) hide show
  1. package/dist/cjs/_commonjsHelpers-B85MJLTf-CFO10eej.js +7 -0
  2. package/dist/cjs/{collapse.animation-6e0b08df-AHWzNGm_.js → collapse.animation-DZDm0vSK-C2TOIhIK.js} +3 -3
  3. package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +23 -0
  4. package/dist/cjs/{fade.animation-9b939939-DV--bM4S.js → fade.animation-DcRL9lcm-DAZeHoKN.js} +75 -75
  5. package/dist/cjs/generated/components.server.js +292 -50
  6. package/dist/cjs/{grow.animation-24ad5cf8-LUp_ITEx.js → grow.animation-D7ep_aVl-BuXEDSK-.js} +5 -26
  7. package/dist/cjs/i18n.utils-IlwlcG9l-ku0bScip.js +2494 -0
  8. package/dist/cjs/{index-WPRkQD3O.js → index-kU2nW5aN.js} +12692 -7009
  9. package/dist/cjs/{nv-dialog.entry-CDSK9pUH.js → index.esm-D3eWMME9-CG1TVKfu.js} +1 -296
  10. package/dist/cjs/index.js +15 -1
  11. package/dist/cjs/inputmask-CSo292ul-DlvupPk6.js +3758 -0
  12. package/dist/cjs/{nv-accordion-item.entry-BuTvA6w9.js → nv-accordion-item.entry-Bu1tAcCq.js} +11 -10
  13. package/dist/cjs/{nv-accordion.entry-Dtsfw6He.js → nv-accordion.entry-jWjLdX8w.js} +9 -11
  14. package/dist/cjs/{nv-alert.entry-TIdfdU7Y.js → nv-alert.entry-E9ZJay_K.js} +22 -23
  15. package/dist/cjs/{nv-avatar.entry-CaxrhPuw.js → nv-avatar.entry-CUX7u0kR.js} +11 -11
  16. package/dist/cjs/{nv-badge_2.entry-CfYvTZxX.js → nv-badge_2.entry-bxpV5gxE.js} +24 -24
  17. package/dist/cjs/{nv-breadcrumb.entry-BCZ4MmfD.js → nv-breadcrumb.entry-Cbbb9Qeh.js} +5 -5
  18. package/dist/cjs/{nv-breadcrumbs.entry-DwzCE7F6.js → nv-breadcrumbs.entry-BTqnp9zO.js} +3 -3
  19. package/dist/cjs/{nv-button.entry-Cr_86bcZ.js → nv-button.entry-upWH19y6.js} +12 -14
  20. package/dist/cjs/{nv-buttongroup.entry-CWjRoHY1.js → nv-buttongroup.entry-CuZCRsnV.js} +3 -3
  21. package/dist/cjs/{nv-calendar.entry-CXfwNt6G.js → nv-calendar.entry-CT3mASW6.js} +113 -97
  22. package/dist/cjs/{nv-col.entry-CJLDS3LY.js → nv-col.entry--pCxkaTh.js} +5 -5
  23. package/dist/cjs/{nv-datagrid.entry-Cns8XSud.js → nv-datagrid.entry-CGCEhO8C.js} +80 -85
  24. package/dist/cjs/{nv-datagridcolumn.entry-CFFAipHF.js → nv-datagridcolumn.entry-Fsqc7CT_.js} +2 -1
  25. package/dist/cjs/nv-dialog.entry-B6OYcZxQ.js +300 -0
  26. package/dist/cjs/{nv-dialogfooter_2.entry-To_dGUn4.js → nv-dialogfooter_2.entry-C4fP_n2-.js} +10 -11
  27. package/dist/cjs/nv-drawer.entry-C5O4KvHU.js +445 -0
  28. package/dist/cjs/nv-drawerfooter_2.entry-C-reYJXG.js +146 -0
  29. package/dist/cjs/nv-fieldcheckbox.entry-bk7UNQny.js +177 -0
  30. package/dist/cjs/{nv-fielddate.entry-C3pXtMHL.js → nv-fielddate.entry-dqZDBVmm.js} +89 -46
  31. package/dist/cjs/{nv-fielddaterange.entry-CjVVPEK_.js → nv-fielddaterange.entry-wNRasXky.js} +151 -103
  32. package/dist/cjs/nv-fielddropdown.entry-BA15piWa.js +678 -0
  33. package/dist/cjs/{nv-fielddropdownitem.entry-Dah-PaE8.js → nv-fielddropdownitem.entry-DEWaf9dC.js} +7 -7
  34. package/dist/cjs/{nv-fieldmultiselect.entry-BMLjhqoJ.js → nv-fieldmultiselect.entry-BWY5xOAd.js} +343 -236
  35. package/dist/cjs/nv-fieldnumber.entry-DoYORd0d.js +187 -0
  36. package/dist/cjs/nv-fieldpassword.entry-CPaLj9aD.js +165 -0
  37. package/dist/cjs/{nv-fieldradio.entry-X_2VT1Dj.js → nv-fieldradio.entry-CvUmEaCa.js} +11 -11
  38. package/dist/cjs/{nv-fieldselect.entry-pSp-2rNn.js → nv-fieldselect.entry-uUIZ6hmN.js} +52 -13
  39. package/dist/cjs/{nv-fieldslider.entry-pZf7zzLU.js → nv-fieldslider.entry-DnvmxxYY.js} +16 -31
  40. package/dist/cjs/nv-fieldtext.entry-BYAJp3n_.js +163 -0
  41. package/dist/cjs/{nv-fieldtextarea.entry-t3Ixxi23.js → nv-fieldtextarea.entry-DU2bWYeg.js} +52 -14
  42. package/dist/cjs/{nv-fieldtime.entry-DY7D5_6K.js → nv-fieldtime.entry-DlMNDTht.js} +128 -84
  43. package/dist/cjs/{nv-icon.entry-6oYPSf4c.js → nv-icon.entry-CnUkRzaA.js} +12 -12
  44. package/dist/cjs/{nv-iconbutton_2.entry-ChULGovr.js → nv-iconbutton_2.entry-hqp4AcRq.js} +10 -12
  45. package/dist/cjs/{nv-menu.entry-sd0tatWq.js → nv-menu.entry-Dc_FvIx7.js} +18 -32
  46. package/dist/cjs/{nv-menuitem.entry-CCOqR7UF.js → nv-menuitem.entry-DzMhx6c_.js} +6 -5
  47. package/dist/cjs/nv-notification-bullet.entry-BwhHCMQF.js +76 -0
  48. package/dist/cjs/{nv-notification.entry-Cc3zE3yY.js → nv-notification.entry-C3m5p5BL.js} +42 -128
  49. package/dist/cjs/{nv-notificationcontainer.entry-DV4D6oOH.js → nv-notificationcontainer.entry-DTRNn7VE.js} +4 -4
  50. package/dist/cjs/{nv-popover.entry-DQSwI2jT.js → nv-popover.entry-B0c-2rO4.js} +51 -47
  51. package/dist/cjs/{nv-row.entry-UUuMSAY5.js → nv-row.entry-CdcjVGZv.js} +4 -4
  52. package/dist/cjs/nv-sidebar.entry-CiN813gQ.js +177 -0
  53. package/dist/cjs/nv-sidebarcontent.entry-D9hpAhK8.js +22 -0
  54. package/dist/cjs/nv-sidebardivider.entry-B4EMyca5.js +22 -0
  55. package/dist/cjs/nv-sidebarfooter.entry-CHi4qOFe.js +22 -0
  56. package/dist/cjs/nv-sidebargroup.entry-RVqrsyIU.js +23 -0
  57. package/dist/cjs/nv-sidebarheader.entry-_7ch0O3G.js +22 -0
  58. package/dist/cjs/nv-sidebarlogo.entry-Ch9F-JnT.js +32 -0
  59. package/dist/cjs/nv-sidebarnavitem.entry-DVrafSMr.js +296 -0
  60. package/dist/cjs/nv-sidebarnavsubitem.entry-C0XDAzma.js +35 -0
  61. package/dist/cjs/{nv-split.entry-CYP2bTTM.js → nv-split.entry-0HTslRAX.js} +47 -45
  62. package/dist/cjs/{nv-stack.entry-D35-75Vw.js → nv-stack.entry-CqO7uTQf.js} +5 -5
  63. package/dist/cjs/{nv-table.entry-DevWJBnL.js → nv-table.entry-DH85n8Mc.js} +9 -11
  64. package/dist/cjs/{nv-tableheader.entry-Hs7nUSOC.js → nv-tableheader.entry-CKfocdxD.js} +7 -7
  65. package/dist/cjs/{nv-toggle.entry-Eje9d--6.js → nv-toggle.entry-BHUl76Im.js} +9 -9
  66. package/dist/cjs/nv-togglebutton.entry-D_9COjY-.js +67 -0
  67. package/dist/cjs/{nv-togglebuttongroup.entry-CWN_Ucry.js → nv-togglebuttongroup.entry-C0NLbsq7.js} +10 -8
  68. package/dist/cjs/{nv-tooltip.entry-BGkKDEFg.js → nv-tooltip.entry-BfViGE_U.js} +5 -5
  69. package/dist/cjs/slide.animation-CmH5d1of-BZuw607U.js +90 -0
  70. package/dist/cjs/{style-value-types.es-f5d10b79-D0QCM8OB.js → style-value-types.es-xlgmw4x8-B1vLqX9m.js} +6 -3
  71. package/dist/cjs/{v4-a79185f4-2n0dOd_Y.js → v4-BdYh22OP-C1vaJ4yP.js} +1 -1
  72. package/dist/components/NvDatatable/NvDatatable.js +40 -24
  73. package/dist/generated/components.js +107 -0
  74. package/dist/generated/components.server.js +260 -50
  75. package/dist/providers/NotificationProvider.js +3 -4
  76. package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
  77. package/dist/types/components/NvDatatable/types.d.ts +8 -3
  78. package/dist/types/generated/components.d.ts +46 -0
  79. package/dist/types/generated/components.server.d.ts +46 -0
  80. package/package.json +2 -2
  81. package/dist/cjs/_commonjsHelpers-1789f0cf-BJu3ubxk.js +0 -10
  82. package/dist/cjs/inputmask-edcad3c1-B9Omti4z.js +0 -3749
  83. package/dist/cjs/nv-fieldcheckbox.entry-fdonR07Z.js +0 -138
  84. package/dist/cjs/nv-fielddropdown.entry-C9mXuNNj.js +0 -392
  85. package/dist/cjs/nv-fieldnumber.entry-DBdJviXu.js +0 -148
  86. package/dist/cjs/nv-fieldpassword.entry-Cim_usSM.js +0 -122
  87. package/dist/cjs/nv-fieldtext.entry-DlI_ExaV.js +0 -124
  88. package/dist/cjs/nv-togglebutton.entry-LGI7pIeK.js +0 -56
  89. /package/dist/cjs/{clsx-297c1ffe-BtxeOLZW.js → clsx-ChV9xqsO-BtxeOLZW.js} +0 -0
  90. /package/dist/cjs/{constants-69bafca2-DpB_ghPF.js → constants-BReL3Lsa-DpB_ghPF.js} +0 -0
  91. /package/dist/cjs/{timeline.animation-79215cd4-KteJaZPb.js → timeline.animation-CgHCo_Ho-KteJaZPb.js} +0 -0
@@ -0,0 +1,300 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-kU2nW5aN.js');
4
+ var index_esmD3eWMME9 = require('./index.esm-D3eWMME9-CG1TVKfu.js');
5
+ var events_utilsB6GgGra_ = require('./events.utils-B6GgGra--01N__3wY.js');
6
+ var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
7
+ var grow_animationD7ep_aVl = require('./grow.animation-D7ep_aVl-BuXEDSK-.js');
8
+ require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
9
+ var timeline_animationCgHCo_Ho = require('./timeline.animation-CgHCo_Ho-KteJaZPb.js');
10
+ var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
11
+ var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
12
+ var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
13
+ require('@stencil/react-output-target/runtime');
14
+ require('react');
15
+ require('react-dom');
16
+
17
+ const nvDialogCss = "nv-dialog dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px)}nv-dialog dialog.full .content{min-width:90vw;width:90vw;max-width:90vw}nv-dialog .backdrop{display:flex;min-height:100%;padding:var(--spacing-3);box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}nv-dialog .backdrop .content{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 400px);width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;display:flex;flex-direction:column;align-items:flex-start;height:fit-content;position:relative}nv-dialog .backdrop .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-dialog .backdrop .content .content-body{box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text);width:100%}";
18
+
19
+ const NvDialog = class {
20
+ constructor(hostRef) {
21
+ index.registerInstance(this, hostRef);
22
+ this.openChanged = index.createEvent(this, "openChanged", 3);
23
+ this.eventsAttached = false;
24
+ this.triggerClickEvents = [
25
+ ['click', this.show],
26
+ [
27
+ 'keydown',
28
+ (e) => {
29
+ if (e.key === 'Enter' || e.key === ' ') {
30
+ e.preventDefault();
31
+ this.show();
32
+ }
33
+ },
34
+ ],
35
+ ];
36
+ /**
37
+ * Use this prop to toggle the visibility of the dialog. Set to true to show
38
+ * the dialog and false to hide it.
39
+ */
40
+ this.open = false;
41
+ /**
42
+ * If true, the dialog cannot be closed by the user.
43
+ */
44
+ this.undismissable = false;
45
+ /**
46
+ * If true, the dialog will be closed when the backdrop is clicked.
47
+ */
48
+ this.clickOutside = false;
49
+ /**
50
+ * If true, the dialog visibility is managed manually through methods or the
51
+ * open prop.
52
+ */
53
+ this.controlled = false;
54
+ /**
55
+ * If true, the dialog takes full width styling.
56
+ */
57
+ this.full = false;
58
+ /**
59
+ * Controls whether the dialog should automatically focus the first focusable
60
+ * element when opened. When disabled, prevents unwanted tooltip triggers on
61
+ * dialog open.
62
+ */
63
+ this.autofocus = false;
64
+ /**
65
+ * Checks for and sets up form ID if a form is present
66
+ */
67
+ this.checkForForm = () => {
68
+ if (!this.form) {
69
+ const formElement = this.el.querySelector('form');
70
+ if (formElement) {
71
+ this.form = this.ensureFormId(formElement);
72
+ }
73
+ }
74
+ };
75
+ /**
76
+ * Handles the native dialog close event.
77
+ */
78
+ this.handleDialogClose = () => {
79
+ if (this.open) {
80
+ this.close();
81
+ }
82
+ };
83
+ /**
84
+ * Handles the click event to close the dialog when clickOutside is true.
85
+ * @param {MouseEvent} event - The click event.
86
+ */
87
+ this.handleDialogClick = (event) => {
88
+ if (!this.clickOutside || this.undismissable)
89
+ return;
90
+ if (this.checkForOpenPopovers())
91
+ return;
92
+ if (event.target === this.backdropElement) {
93
+ this.close();
94
+ event.preventDefault();
95
+ event.stopPropagation();
96
+ }
97
+ };
98
+ this.checkForOpenPopovers = () => {
99
+ let hasOpenPopover = false;
100
+ this.el.querySelectorAll('nv-popover').forEach(popover => {
101
+ if (popover.hasAttribute('open')) {
102
+ hasOpenPopover = true;
103
+ }
104
+ });
105
+ return hasOpenPopover;
106
+ };
107
+ }
108
+ //#endregion PROPERTIES
109
+ /****************************************************************************/
110
+ //#region METHODS
111
+ /**
112
+ * Call this method to show the dialog, making it visible on the screen.
113
+ */
114
+ async show() {
115
+ this.open = true;
116
+ this.preventScroll();
117
+ /** It is recommended to use the .show() or .showModal() method to render
118
+ * dialogs, rather than the open attribute. If a <dialog> is opened using
119
+ * the open attribute, it is non-modal. */
120
+ const { setFadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement);
121
+ setFadeOut();
122
+ this.dialogElement.showModal();
123
+ const { setGrowIn, growIn } = grow_animationD7ep_aVl.useGrow(this.contentElement, {
124
+ duration: 100,
125
+ amount: 0.9,
126
+ });
127
+ const { fadeIn } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
128
+ duration: 100,
129
+ });
130
+ setGrowIn();
131
+ await timeline_animationCgHCo_Ho.parallel(fadeIn, growIn).start();
132
+ }
133
+ /**
134
+ * Call this method to hide the dialog, making it disappear from view.
135
+ */
136
+ async close() {
137
+ this.open = false;
138
+ this.allowScroll();
139
+ const { growOut } = grow_animationD7ep_aVl.useGrow(this.contentElement, {
140
+ duration: 150,
141
+ amount: 0.85,
142
+ });
143
+ const { fadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
144
+ duration: 150,
145
+ });
146
+ await timeline_animationCgHCo_Ho.parallel(growOut, fadeOut).start();
147
+ this.dialogElement.close();
148
+ }
149
+ /**
150
+ * Sets the autofocus on the first focusable element in the dialog.
151
+ */
152
+ setAutofocus() {
153
+ const focusableElements = index_esmD3eWMME9.tabbable(this.dialogElement, {
154
+ displayCheck: 'none',
155
+ });
156
+ if (focusableElements.length > 0) {
157
+ // Convert to array and find element with smallest top and left position
158
+ let topLeftElement = focusableElements[0];
159
+ let topLeftRect = topLeftElement.getBoundingClientRect();
160
+ focusableElements.forEach(element => {
161
+ const rect = element.getBoundingClientRect();
162
+ if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {
163
+ topLeftElement = element;
164
+ topLeftRect = rect;
165
+ }
166
+ });
167
+ // Set autofocus attribute on the found element
168
+ topLeftElement.setAttribute('autofocus', 'true');
169
+ }
170
+ }
171
+ /**
172
+ * Attaches event listeners to the dialog.
173
+ */
174
+ attachEventListeners() {
175
+ if (this.triggerElement && !this.eventsAttached && !this.controlled) {
176
+ events_utilsB6GgGra_.addEventListeners(this.triggerClickEvents, this.triggerElement, this);
177
+ this.eventsAttached = true;
178
+ }
179
+ }
180
+ /**
181
+ * Prevents the body from scrolling when the dialog is open.
182
+ * Compensates for scrollbar width to prevent layout shift.
183
+ */
184
+ preventScroll() {
185
+ // Calculate scrollbar width
186
+ const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
187
+ // Apply overflow hidden and padding compensation
188
+ document.documentElement.style.overflow = 'hidden';
189
+ document.documentElement.style.paddingRight = `${scrollBarWidth}px`;
190
+ }
191
+ /**
192
+ * Allows the body to scroll when the dialog is closed.
193
+ * Removes the applied overflow and padding styles.
194
+ */
195
+ allowScroll() {
196
+ // Remove the applied styles
197
+ document.documentElement.style.removeProperty('overflow');
198
+ document.documentElement.style.removeProperty('padding-right');
199
+ }
200
+ ensureFormId(formElement) {
201
+ if (!formElement.id) {
202
+ formElement.id = `dialog-form-${v4BdYh22OP.v4()}`;
203
+ }
204
+ return formElement.id;
205
+ }
206
+ //#endregion EVENTS
207
+ /****************************************************************************/
208
+ //#region WATCHERS
209
+ async handleDialogOpenChange(isOpen) {
210
+ if (isOpen) {
211
+ this.show();
212
+ this.openChanged.emit(isOpen);
213
+ }
214
+ else {
215
+ this.close();
216
+ this.openChanged.emit(isOpen);
217
+ }
218
+ }
219
+ //#endregion WATCHERS
220
+ /****************************************************************************/
221
+ //#region LISTENERS
222
+ /**
223
+ * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.
224
+ * @param {KeyboardEvent} event - The keydown event.
225
+ */
226
+ handleKeyDown(event) {
227
+ if (event.key !== 'Escape')
228
+ return;
229
+ if (!this.open)
230
+ return;
231
+ event.preventDefault();
232
+ event.stopPropagation();
233
+ const hasOpenPopover = this.checkForOpenPopovers();
234
+ if (!this.undismissable && !hasOpenPopover) {
235
+ event.preventDefault();
236
+ event.stopPropagation();
237
+ this.close();
238
+ }
239
+ }
240
+ //#endregion LISTENERS
241
+ /****************************************************************************/
242
+ //#region LIFECYCLE
243
+ /**
244
+ * Lifecycle method that runs before the component loads.
245
+ * Initializes the trigger, header, and footer elements by finding them in the component's children.
246
+ * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)
247
+ */
248
+ componentWillLoad() {
249
+ this.triggerElement = Array.from(this.el.children).find(child => {
250
+ return child.getAttribute('slot') === 'trigger';
251
+ });
252
+ this.headerElement = Array.from(this.el.children).find(child => {
253
+ return (child.getAttribute('slot') === 'header' ||
254
+ child.tagName.toLowerCase() === 'nv-dialogheader');
255
+ });
256
+ this.footerElement = Array.from(this.el.children).find(child => {
257
+ return (child.getAttribute('slot') === 'footer' ||
258
+ child.tagName.toLowerCase() === 'nv-dialogfooter');
259
+ });
260
+ // Initial form check
261
+ this.checkForForm();
262
+ }
263
+ componentWillUpdate() {
264
+ this.attachEventListeners();
265
+ }
266
+ componentDidLoad() {
267
+ if (this.open) {
268
+ this.show();
269
+ }
270
+ // Only set autofocus if the prop is true and no element already has autofocus
271
+ if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
272
+ this.setAutofocus();
273
+ }
274
+ this.attachEventListeners();
275
+ // Additional form check in case form was added after initial load
276
+ this.checkForForm();
277
+ // this.setupContentBodyListeners();
278
+ }
279
+ disconnectedCallback() {
280
+ if (this.triggerElement && !this.eventsAttached && !this.controlled) {
281
+ events_utilsB6GgGra_.removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
282
+ this.eventsAttached = false;
283
+ }
284
+ this.allowScroll();
285
+ }
286
+ //#endregion LIFECYCLE
287
+ /****************************************************************************/
288
+ //#region RENDER
289
+ render() {
290
+ const hasForm = this.form || this.el.querySelector('form');
291
+ return (index.h(index.Host, { key: 'e1837ebe65fcf0e56880438b59a5e8c4b5873926' }, index.h("slot", { key: '543e69780f3dad15a91b4bcb1f4199153bbce1b3', name: "trigger" }), index.h("dialog", { key: 'ef1600f73c8d25744b3b69356e1c4a98e605be1e', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, onClick: this.handleDialogClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsxChV9xqsO.clsx({ full: this.full }) }, index.h("div", { key: '894e91291a5ee2a1c26a658e1ca7aaf237d71069', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: '78700c26d1ec553d67a8e62f3f3628fab8deb49a', class: "content", ref: el => (this.contentElement = el) }, !this.undismissable && (index.h("nv-button", { key: 'd042c828bc6886091128425ea3e5c73035a0cea1', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '035273dd23255883a7a5feb354d230242683e00e', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: 'd86417aae675f8611312495d31ca8d0b58c2caaf', class: "content-body", id: "dialog-content" }, index.h("slot", { key: 'cb48b94b846097d04ffd98c6689cd4116e8cd9f9' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? constantsBReL3Lsa.ButtonType.Submit : constantsBReL3Lsa.ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable })))))));
292
+ }
293
+ get el() { return index.getElement(this); }
294
+ static get watchers() { return {
295
+ "open": ["handleDialogOpenChange"]
296
+ }; }
297
+ };
298
+ NvDialog.style = nvDialogCss;
299
+
300
+ exports.nv_dialog = NvDialog;
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-WPRkQD3O.js');
4
- var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
+ var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
5
+ require('@stencil/react-output-target/runtime');
5
6
  require('react');
6
7
  require('react-dom');
7
8
 
8
9
  const nvDialogfooterCss = "nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}";
9
- const NvDialogfooterStyle0 = nvDialogfooterCss;
10
10
 
11
11
  const NvDialogfooter = class {
12
12
  constructor(hostRef) {
13
13
  index.registerInstance(this, hostRef);
14
- this.dialogCanceled = index.createEvent(this, "dialogCanceled");
15
- this.dialogPrimaryClicked = index.createEvent(this, "dialogPrimaryClicked");
14
+ this.dialogCanceled = index.createEvent(this, "dialogCanceled", 3);
15
+ this.dialogPrimaryClicked = index.createEvent(this, "dialogPrimaryClicked", 3);
16
16
  if (hostRef.$hostElement$["s-ei"]) {
17
17
  this.internals = hostRef.$hostElement$["s-ei"];
18
18
  }
@@ -86,22 +86,21 @@ const NvDialogfooter = class {
86
86
  // Set the default button type based on the form property
87
87
  this.primaryButtonType =
88
88
  this.primaryButtonType || this.form
89
- ? constants69bafca2.ButtonType.Submit
90
- : constants69bafca2.ButtonType.Button;
89
+ ? constantsBReL3Lsa.ButtonType.Submit
90
+ : constantsBReL3Lsa.ButtonType.Button;
91
91
  }
92
92
  //#endregion LIFECYCLE
93
93
  /****************************************************************************/
94
94
  //#region RENDER
95
95
  render() {
96
- return (index.h(index.Host, { key: '908abbe8e2e9aa215641dd056c70dc16f36c3ac3' }, !this.hasSlot ? (index.h(index.Fragment, null, !this.undismissable && (index.h("nv-button", { onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), index.h("nv-button", { onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (index.h("nv-icon", { slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (index.h("nv-icon", { slot: "trailing-icon", name: this.trailingIcon, size: "sm" }))))) : (index.h("slot", null))));
96
+ return (index.h(index.Host, { key: '0048aeb5ba7d8919e94f3dff06dddd1bdff813bb' }, !this.hasSlot ? (index.h(index.Fragment, null, !this.undismissable && (index.h("nv-button", { onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), index.h("nv-button", { onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (index.h("nv-icon", { slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (index.h("nv-icon", { slot: "trailing-icon", name: this.trailingIcon, size: "sm" }))))) : (index.h("slot", null))));
97
97
  }
98
98
  static get formAssociated() { return true; }
99
99
  get el() { return index.getElement(this); }
100
100
  };
101
- NvDialogfooter.style = NvDialogfooterStyle0;
101
+ NvDialogfooter.style = nvDialogfooterCss;
102
102
 
103
103
  const nvDialogheaderCss = "nv-dialogheader{padding:var(--dialog-header-padding-top) var(--dialog-header-padding-x) var(--dialog-header-padding-bottom) var(--dialog-header-padding-x);justify-content:space-between;align-items:flex-start;align-self:stretch}nv-dialogheader .heading{color:var(--color-content-high-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-medium-emphasis);padding-right:var(--spacing-7);line-height:var(--leading-px-6);letter-spacing:var(--letter-spacing-heading-xs)}nv-dialogheader .subheading{color:var(--color-content-low-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-sm);}";
104
- const NvDialogheaderStyle0 = nvDialogheaderCss;
105
104
 
106
105
  const NvDialogheader = class {
107
106
  constructor(hostRef) {
@@ -132,7 +131,7 @@ const NvDialogheader = class {
132
131
  }
133
132
  get el() { return index.getElement(this); }
134
133
  };
135
- NvDialogheader.style = NvDialogheaderStyle0;
134
+ NvDialogheader.style = nvDialogheaderCss;
136
135
 
137
136
  exports.nv_dialogfooter = NvDialogfooter;
138
137
  exports.nv_dialogheader = NvDialogheader;