@nova-design-system/nova-react 3.23.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 (74) hide show
  1. package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +23 -0
  2. package/dist/cjs/generated/components.server.js +47 -0
  3. package/dist/cjs/{grow.animation-CvHGHBL4-DDIEYBK-.js → grow.animation-D7ep_aVl-BuXEDSK-.js} +0 -21
  4. package/dist/cjs/{i18n.utils-DOZbXX2L-BizoXo6c.js → i18n.utils-IlwlcG9l-ku0bScip.js} +14 -18
  5. package/dist/cjs/{index-CtjeeUI-.js → index-kU2nW5aN.js} +1589 -920
  6. package/dist/cjs/{nv-dialog.entry-O47Eol_7.js → index.esm-D3eWMME9-CG1TVKfu.js} +1 -296
  7. package/dist/cjs/index.js +4 -1
  8. package/dist/cjs/{nv-accordion-item.entry-B_l0-ux0.js → nv-accordion-item.entry-Bu1tAcCq.js} +1 -1
  9. package/dist/cjs/{nv-accordion.entry-BX8_YuZF.js → nv-accordion.entry-jWjLdX8w.js} +3 -8
  10. package/dist/cjs/{nv-alert.entry-DCWYR0OK.js → nv-alert.entry-E9ZJay_K.js} +2 -3
  11. package/dist/cjs/{nv-avatar.entry-C_xZD3Lp.js → nv-avatar.entry-CUX7u0kR.js} +1 -1
  12. package/dist/cjs/{nv-badge_2.entry-JjqANStV.js → nv-badge_2.entry-bxpV5gxE.js} +2 -2
  13. package/dist/cjs/{nv-breadcrumb.entry-DQZDn6cm.js → nv-breadcrumb.entry-Cbbb9Qeh.js} +1 -1
  14. package/dist/cjs/{nv-breadcrumbs.entry-Bz0GjhY_.js → nv-breadcrumbs.entry-BTqnp9zO.js} +1 -1
  15. package/dist/cjs/{nv-button.entry-Br1DH9Vj.js → nv-button.entry-upWH19y6.js} +4 -6
  16. package/dist/cjs/{nv-buttongroup.entry-BZaTKN_n.js → nv-buttongroup.entry-CuZCRsnV.js} +1 -1
  17. package/dist/cjs/{nv-calendar.entry-D9ESuu7C.js → nv-calendar.entry-CT3mASW6.js} +15 -25
  18. package/dist/cjs/{nv-col.entry-CfgPMMxS.js → nv-col.entry--pCxkaTh.js} +1 -1
  19. package/dist/cjs/{nv-datagrid.entry-DcB5q2oC.js → nv-datagrid.entry-CGCEhO8C.js} +68 -73
  20. package/dist/cjs/{nv-datagridcolumn.entry-BhKOzXA6.js → nv-datagridcolumn.entry-Fsqc7CT_.js} +1 -1
  21. package/dist/cjs/nv-dialog.entry-B6OYcZxQ.js +300 -0
  22. package/dist/cjs/{nv-dialogfooter_2.entry-Dn16bI8a.js → nv-dialogfooter_2.entry-C4fP_n2-.js} +1 -1
  23. package/dist/cjs/nv-drawer.entry-C5O4KvHU.js +445 -0
  24. package/dist/cjs/nv-drawerfooter_2.entry-C-reYJXG.js +146 -0
  25. package/dist/cjs/{nv-fieldcheckbox.entry-Bx6ArV_b.js → nv-fieldcheckbox.entry-bk7UNQny.js} +7 -7
  26. package/dist/cjs/{nv-fielddate.entry-B4P0U8QG.js → nv-fielddate.entry-dqZDBVmm.js} +13 -16
  27. package/dist/cjs/{nv-fielddaterange.entry-BORwYJ-k.js → nv-fielddaterange.entry-wNRasXky.js} +13 -14
  28. package/dist/cjs/{nv-fielddropdown.entry-DzBAIynY.js → nv-fielddropdown.entry-BA15piWa.js} +40 -49
  29. package/dist/cjs/{nv-fielddropdownitem.entry-C_17isWd.js → nv-fielddropdownitem.entry-DEWaf9dC.js} +3 -4
  30. package/dist/cjs/{nv-fieldmultiselect.entry-DiqRreWh.js → nv-fieldmultiselect.entry-BWY5xOAd.js} +35 -43
  31. package/dist/cjs/{nv-fieldnumber.entry-C9O4UPp3.js → nv-fieldnumber.entry-DoYORd0d.js} +7 -7
  32. package/dist/cjs/{nv-fieldpassword.entry-BfVJNT0A.js → nv-fieldpassword.entry-CPaLj9aD.js} +7 -7
  33. package/dist/cjs/{nv-fieldradio.entry-CG22oETM.js → nv-fieldradio.entry-CvUmEaCa.js} +5 -5
  34. package/dist/cjs/{nv-fieldselect.entry-BPQEtrv2.js → nv-fieldselect.entry-uUIZ6hmN.js} +9 -9
  35. package/dist/cjs/{nv-fieldslider.entry-CozmnUfN.js → nv-fieldslider.entry-DnvmxxYY.js} +6 -6
  36. package/dist/cjs/{nv-fieldtext.entry-BD-z01ru.js → nv-fieldtext.entry-BYAJp3n_.js} +7 -7
  37. package/dist/cjs/{nv-fieldtextarea.entry-7UrKWDHg.js → nv-fieldtextarea.entry-DU2bWYeg.js} +7 -8
  38. package/dist/cjs/{nv-fieldtime.entry-DakOlLiO.js → nv-fieldtime.entry-DlMNDTht.js} +28 -36
  39. package/dist/cjs/{nv-icon.entry-Db00kB2u.js → nv-icon.entry-CnUkRzaA.js} +3 -3
  40. package/dist/cjs/{nv-iconbutton_2.entry-CaKCa8NT.js → nv-iconbutton_2.entry-hqp4AcRq.js} +6 -7
  41. package/dist/cjs/{nv-menu.entry-CK2HdmBt.js → nv-menu.entry-Dc_FvIx7.js} +4 -5
  42. package/dist/cjs/{nv-menuitem.entry-mKMqCAdz.js → nv-menuitem.entry-DzMhx6c_.js} +2 -2
  43. package/dist/cjs/{nv-notification-bullet.entry-DtbjtFxs.js → nv-notification-bullet.entry-BwhHCMQF.js} +2 -3
  44. package/dist/cjs/{nv-notification.entry-CLb0gNu3.js → nv-notification.entry-C3m5p5BL.js} +11 -97
  45. package/dist/cjs/{nv-notificationcontainer.entry-Cijivlm6.js → nv-notificationcontainer.entry-DTRNn7VE.js} +2 -2
  46. package/dist/cjs/{nv-popover.entry-mLdLSp6n.js → nv-popover.entry-B0c-2rO4.js} +15 -15
  47. package/dist/cjs/{nv-row.entry-C2C94fcv.js → nv-row.entry-CdcjVGZv.js} +2 -2
  48. package/dist/cjs/{nv-sidebar.entry-inDVNJ4s.js → nv-sidebar.entry-CiN813gQ.js} +4 -4
  49. package/dist/cjs/{nv-sidebarcontent.entry-DxoljE15.js → nv-sidebarcontent.entry-D9hpAhK8.js} +2 -2
  50. package/dist/cjs/{nv-sidebardivider.entry-D_yern0R.js → nv-sidebardivider.entry-B4EMyca5.js} +2 -2
  51. package/dist/cjs/{nv-sidebarfooter.entry-Rkkn9TB_.js → nv-sidebarfooter.entry-CHi4qOFe.js} +2 -2
  52. package/dist/cjs/{nv-sidebargroup.entry-C1p9qqxr.js → nv-sidebargroup.entry-RVqrsyIU.js} +2 -2
  53. package/dist/cjs/{nv-sidebarheader.entry-CYpD_4pI.js → nv-sidebarheader.entry-_7ch0O3G.js} +2 -2
  54. package/dist/cjs/{nv-sidebarlogo.entry-BgK03M1v.js → nv-sidebarlogo.entry-Ch9F-JnT.js} +2 -2
  55. package/dist/cjs/{nv-sidebarnavitem.entry-DglvcCOD.js → nv-sidebarnavitem.entry-DVrafSMr.js} +5 -6
  56. package/dist/cjs/{nv-sidebarnavsubitem.entry-Dt1jKmC-.js → nv-sidebarnavsubitem.entry-C0XDAzma.js} +2 -2
  57. package/dist/cjs/{nv-split.entry-mzg2F66T.js → nv-split.entry-0HTslRAX.js} +44 -42
  58. package/dist/cjs/{nv-stack.entry-nnvjTrBy.js → nv-stack.entry-CqO7uTQf.js} +2 -2
  59. package/dist/cjs/{nv-table.entry-DkbNgxtI.js → nv-table.entry-DH85n8Mc.js} +7 -9
  60. package/dist/cjs/{nv-tableheader.entry-CRVFTQA-.js → nv-tableheader.entry-CKfocdxD.js} +3 -3
  61. package/dist/cjs/{nv-toggle.entry-oC9TVkr1.js → nv-toggle.entry-BHUl76Im.js} +3 -3
  62. package/dist/cjs/nv-togglebutton.entry-D_9COjY-.js +67 -0
  63. package/dist/cjs/{nv-togglebuttongroup.entry-BYXX5ejg.js → nv-togglebuttongroup.entry-C0NLbsq7.js} +4 -5
  64. package/dist/cjs/{nv-tooltip.entry-OJGxfJEh.js → nv-tooltip.entry-BfViGE_U.js} +2 -2
  65. package/dist/cjs/slide.animation-CmH5d1of-BZuw607U.js +90 -0
  66. package/dist/components/NvDatatable/NvDatatable.js +40 -24
  67. package/dist/generated/components.js +27 -0
  68. package/dist/generated/components.server.js +44 -0
  69. package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
  70. package/dist/types/components/NvDatatable/types.d.ts +8 -3
  71. package/dist/types/generated/components.d.ts +14 -0
  72. package/dist/types/generated/components.server.d.ts +14 -0
  73. package/package.json +1 -1
  74. package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +0 -67
@@ -0,0 +1,445 @@
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
+ require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
8
+ var slide_animationCmH5d1of = require('./slide.animation-CmH5d1of-BZuw607U.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 nvDrawerCss = "nv-drawer 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);border:none}nv-drawer dialog[data-state=closed]{pointer-events:none}nv-drawer dialog[data-state=open]{pointer-events:auto}nv-drawer dialog.side-right .backdrop{justify-content:flex-end}nv-drawer dialog.side-right .content{box-shadow:-4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer dialog.side-left .backdrop{justify-content:flex-start}nv-drawer dialog.side-left .content{box-shadow:4px 0 24px rgba(0, 0, 0, 0.15)}nv-drawer .backdrop{display:flex;height:100%;width:100%;padding:0}nv-drawer .backdrop .content{background:var(--color-level-00-background);width:var(--drawer-width, min(90vw, 400px));height:100%;display:flex;flex-direction:column;align-items:flex-start;position:relative}nv-drawer .backdrop .content[data-side=left]{border-top-right-radius:var(--drawer-radius-top-right, 0);border-bottom-right-radius:var(--drawer-radius-bottom-right, 0)}nv-drawer .backdrop .content[data-side=right]{border-top-left-radius:var(--drawer-radius-top-left, 0);border-bottom-left-radius:var(--drawer-radius-bottom-left, 0)}nv-drawer .backdrop .content.size-sm{width:clamp(var(--drawer-size-sm-min-width), var(--drawer-size-sm-width), var(--drawer-size-sm-max-width))}nv-drawer .backdrop .content.size-md{width:clamp(var(--drawer-size-md-min-width), var(--drawer-size-md-width), var(--drawer-size-md-max-width))}nv-drawer .backdrop .content.size-lg{width:clamp(var(--drawer-size-lg-min-width), var(--drawer-size-lg-width), var(--drawer-size-lg-max-width))}nv-drawer .backdrop .content.size-full{width:var(--drawer-size-full-width)}nv-drawer .backdrop .content nv-button.close-button{position:absolute;top:var(--drawer-dismissible-position-top, var(--dialog-dismissible-position-top));right:var(--drawer-dismissible-position-right, var(--dialog-dismissible-position-right));z-index:1;display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:var(--drawer-gap-y, 10px)}nv-drawer .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-drawer .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-drawer .backdrop .content .content-body{box-sizing:border-box;padding:var(--drawer-padding-y, var(--dialog-body-padding-y)) var(--drawer-padding-x, var(--dialog-body-padding-x));scrollbar-gutter:stable both-edges;flex:1;overflow-y:auto;width:100%;border-bottom:1px solid var(--color-content-low-border);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)}nv-drawer .backdrop .content slot[name=footer]::slotted(*),nv-drawer .backdrop .content nv-drawerfooter{padding-top:var(--spacing-4)}";
18
+
19
+ const NvDrawer = class {
20
+ constructor(hostRef) {
21
+ index.registerInstance(this, hostRef);
22
+ this.openChanged = index.createEvent(this, "openChanged", 3);
23
+ this.eventsAttached = false;
24
+ this.swipeStartX = null;
25
+ this.swipeStartY = null;
26
+ this.swipeStartTime = null;
27
+ this.isSwiping = false;
28
+ this.SWIPE_THRESHOLD = 50; // Minimum distance for a swipe (px)
29
+ this.SWIPE_EDGE_ZONE = 20; // Edge detection zone (px)
30
+ this.SWIPE_VELOCITY_THRESHOLD = 0.3; // Minimum velocity (px/ms)
31
+ this.triggerClickEvents = [
32
+ ['click', this.show],
33
+ [
34
+ 'keydown',
35
+ (e) => {
36
+ if (e.key === 'Enter' || e.key === ' ') {
37
+ e.preventDefault();
38
+ this.show();
39
+ }
40
+ },
41
+ ],
42
+ ];
43
+ /****************************************************************************/
44
+ //#region PROPERTIES
45
+ /**
46
+ * Use this prop to toggle the visibility of the drawer. Set to true to show
47
+ * the drawer and false to hide it.
48
+ */
49
+ this.open = false;
50
+ /**
51
+ * If true, the drawer cannot be closed by the user.
52
+ */
53
+ this.undismissable = false;
54
+ /**
55
+ * If true, the drawer will be closed when the backdrop is clicked.
56
+ */
57
+ this.clickOutside = false;
58
+ /**
59
+ * If true, the drawer visibility is managed manually through methods or the
60
+ * open prop.
61
+ */
62
+ this.controlled = false;
63
+ /**
64
+ * Side from which the drawer appears.
65
+ */
66
+ this.side = 'right';
67
+ /**
68
+ * Size of the drawer. Defaults to 'md'.
69
+ * - 'sm': Small drawer (~320px)
70
+ * - 'md': Medium drawer (~400px)
71
+ * - 'lg': Large drawer (~600px)
72
+ * - 'full': Full width drawer (100vw on mobile, ~800px on desktop)
73
+ */
74
+ this.size = 'md';
75
+ /**
76
+ * Controls whether the drawer should automatically focus the first focusable
77
+ * element when opened. When disabled, prevents unwanted tooltip triggers on
78
+ * drawer open.
79
+ */
80
+ this.autofocus = false;
81
+ /**
82
+ * Enables swipe gesture to open/close the drawer on touch devices.
83
+ * - Swipe from the edge (left for left drawer, right for right drawer) to open
84
+ * - Swipe towards the edge from inside the drawer to close
85
+ */
86
+ this.swipeToOpen = false;
87
+ /**
88
+ * Checks for and sets up form ID if a form is present
89
+ */
90
+ this.checkForForm = () => {
91
+ if (!this.form) {
92
+ const formElement = this.el.querySelector('form');
93
+ if (formElement) {
94
+ this.form = this.ensureFormId(formElement);
95
+ }
96
+ }
97
+ };
98
+ /**
99
+ * Handles the native drawer close event.
100
+ */
101
+ this.handleDrawerClose = () => {
102
+ if (this.open) {
103
+ this.close();
104
+ }
105
+ };
106
+ /**
107
+ * Handles the click event to close the drawer when clickOutside is true.
108
+ * @param {MouseEvent} event - The click event.
109
+ */
110
+ this.handleDrawerClick = (event) => {
111
+ if (!this.clickOutside || this.undismissable)
112
+ return;
113
+ if (this.checkForOpenPopovers())
114
+ return;
115
+ if (event.target === this.backdropElement) {
116
+ this.close();
117
+ event.preventDefault();
118
+ event.stopPropagation();
119
+ }
120
+ };
121
+ this.checkForOpenPopovers = () => {
122
+ let hasOpenPopover = false;
123
+ this.el.querySelectorAll('nv-popover').forEach(popover => {
124
+ if (popover.hasAttribute('open')) {
125
+ hasOpenPopover = true;
126
+ }
127
+ });
128
+ return hasOpenPopover;
129
+ };
130
+ }
131
+ //#endregion PROPERTIES
132
+ /****************************************************************************/
133
+ //#region METHODS
134
+ /**
135
+ * Call this method to show the drawer, making it visible on the screen.
136
+ */
137
+ async show() {
138
+ this.open = true;
139
+ this.preventScroll();
140
+ /** It is recommended to use the .show() or .showModal() method to render
141
+ * drawers, rather than the open attribute. If a <dialog> is opened using
142
+ * the open attribute, it is non-modal. */
143
+ const { setFadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement);
144
+ setFadeOut();
145
+ this.dialogElement.showModal();
146
+ // Wait for dialog to be visible
147
+ await new Promise(resolve => requestAnimationFrame(resolve));
148
+ // Set initial position off-screen and animate
149
+ const slideDirection = this.side === 'right' ? 100 : -100;
150
+ const { setSlideX, slideX } = slide_animationCmH5d1of.useSlide(this.contentElement, {
151
+ duration: 300,
152
+ });
153
+ const { fadeIn } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
154
+ duration: 300,
155
+ });
156
+ // Clear any previous transform first
157
+ if (this.contentElement) {
158
+ this.contentElement.style.transform = '';
159
+ }
160
+ // Set initial position off-screen
161
+ setSlideX(slideDirection);
162
+ // Wait another frame to ensure position is set
163
+ await new Promise(resolve => requestAnimationFrame(resolve));
164
+ // Animate both slide and fade in parallel
165
+ const slideIn = slideX({ from: slideDirection, to: 0 });
166
+ await timeline_animationCgHCo_Ho.parallel(fadeIn, slideIn).start();
167
+ }
168
+ /**
169
+ * Call this method to hide the drawer, making it disappear from view.
170
+ */
171
+ async close() {
172
+ this.open = false;
173
+ this.allowScroll();
174
+ const slideDirection = this.side === 'right' ? 100 : -100;
175
+ const { slideX } = slide_animationCmH5d1of.useSlide(this.contentElement, {
176
+ duration: 300,
177
+ });
178
+ const { fadeOut } = fade_animationDcRL9lcm.useFade(this.dialogElement, {
179
+ duration: 300,
180
+ });
181
+ // Animate both slide and fade out in parallel
182
+ const slideOut = slideX({ from: 0, to: slideDirection });
183
+ await timeline_animationCgHCo_Ho.parallel(slideOut, fadeOut).start();
184
+ // Reset transform after animation completes
185
+ if (this.contentElement) {
186
+ this.contentElement.style.transform = '';
187
+ }
188
+ this.dialogElement.close();
189
+ }
190
+ /**
191
+ * Sets the autofocus on the first focusable element in the drawer.
192
+ */
193
+ setAutofocus() {
194
+ const focusableElements = index_esmD3eWMME9.tabbable(this.dialogElement, {
195
+ displayCheck: 'none',
196
+ });
197
+ if (focusableElements.length > 0) {
198
+ // Convert to array and find element with smallest top and left position
199
+ let topLeftElement = focusableElements[0];
200
+ let topLeftRect = topLeftElement.getBoundingClientRect();
201
+ focusableElements.forEach(element => {
202
+ const rect = element.getBoundingClientRect();
203
+ if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {
204
+ topLeftElement = element;
205
+ topLeftRect = rect;
206
+ }
207
+ });
208
+ // Set autofocus attribute on the found element
209
+ topLeftElement.setAttribute('autofocus', 'true');
210
+ }
211
+ }
212
+ /**
213
+ * Attaches event listeners to the drawer.
214
+ */
215
+ attachEventListeners() {
216
+ if (this.triggerElement && !this.eventsAttached && !this.controlled) {
217
+ events_utilsB6GgGra_.addEventListeners(this.triggerClickEvents, this.triggerElement, this);
218
+ this.eventsAttached = true;
219
+ }
220
+ }
221
+ /**
222
+ * Prevents the body from scrolling when the drawer is open.
223
+ * Compensates for scrollbar width to prevent layout shift.
224
+ */
225
+ preventScroll() {
226
+ // Calculate scrollbar width
227
+ const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
228
+ // Apply overflow hidden and padding compensation
229
+ document.documentElement.style.overflow = 'hidden';
230
+ document.documentElement.style.paddingRight = `${scrollBarWidth}px`;
231
+ }
232
+ /**
233
+ * Allows the body to scroll when the drawer is closed.
234
+ * Removes the applied overflow and padding styles.
235
+ */
236
+ allowScroll() {
237
+ // Remove the applied styles
238
+ document.documentElement.style.removeProperty('overflow');
239
+ document.documentElement.style.removeProperty('padding-right');
240
+ }
241
+ ensureFormId(formElement) {
242
+ if (!formElement.id) {
243
+ formElement.id = `drawer-form-${v4BdYh22OP.v4()}`;
244
+ }
245
+ return formElement.id;
246
+ }
247
+ //#endregion EVENTS
248
+ /****************************************************************************/
249
+ //#region WATCHERS
250
+ async handleDrawerOpenChange(isOpen) {
251
+ if (isOpen) {
252
+ this.show();
253
+ this.openChanged.emit(isOpen);
254
+ }
255
+ else {
256
+ this.close();
257
+ this.openChanged.emit(isOpen);
258
+ }
259
+ }
260
+ //#endregion WATCHERS
261
+ /****************************************************************************/
262
+ //#region LISTENERS
263
+ /**
264
+ * Handles the keydown event to optionally prevent the native drawer from closing when the escape key is pressed.
265
+ * @param {KeyboardEvent} event - The keydown event.
266
+ */
267
+ handleKeyDown(event) {
268
+ if (event.key !== 'Escape')
269
+ return;
270
+ if (!this.open)
271
+ return;
272
+ event.preventDefault();
273
+ event.stopPropagation();
274
+ const hasOpenPopover = this.checkForOpenPopovers();
275
+ if (!this.undismissable && !hasOpenPopover) {
276
+ event.preventDefault();
277
+ event.stopPropagation();
278
+ this.close();
279
+ }
280
+ }
281
+ /**
282
+ * Handles pointer down events for swipe detection.
283
+ * @param {PointerEvent} event - The pointer down event.
284
+ */
285
+ handlePointerDown(event) {
286
+ if (!this.swipeToOpen || this.controlled)
287
+ return;
288
+ const x = event.clientX;
289
+ const y = event.clientY;
290
+ const screenWidth = window.innerWidth;
291
+ // Check if swipe starts from edge (for opening drawer)
292
+ if (!this.open) {
293
+ const isLeftEdge = this.side === 'left' && x <= this.SWIPE_EDGE_ZONE;
294
+ const isRightEdge = this.side === 'right' && x >= screenWidth - this.SWIPE_EDGE_ZONE;
295
+ if (isLeftEdge || isRightEdge) {
296
+ this.swipeStartX = x;
297
+ this.swipeStartY = y;
298
+ this.swipeStartTime = Date.now();
299
+ this.isSwiping = true;
300
+ event.preventDefault();
301
+ }
302
+ }
303
+ else {
304
+ // Check if swipe starts from inside the drawer (for closing)
305
+ if (this.contentElement && this.dialogElement.hasAttribute('open')) {
306
+ const drawerRect = this.contentElement.getBoundingClientRect();
307
+ if (x >= drawerRect.left &&
308
+ x <= drawerRect.right &&
309
+ y >= drawerRect.top &&
310
+ y <= drawerRect.bottom) {
311
+ this.swipeStartX = x;
312
+ this.swipeStartY = y;
313
+ this.swipeStartTime = Date.now();
314
+ this.isSwiping = true;
315
+ }
316
+ }
317
+ }
318
+ }
319
+ /**
320
+ * Handles pointer move events during swipe.
321
+ * @param {PointerEvent} event - The pointer move event.
322
+ */
323
+ handlePointerMove(event) {
324
+ if (!this.isSwiping || !this.swipeStartX || !this.swipeStartY)
325
+ return;
326
+ // Prevent scrolling during swipe
327
+ event.preventDefault();
328
+ }
329
+ /**
330
+ * Handles pointer up events to complete swipe gesture.
331
+ * @param {PointerEvent} event - The pointer up event.
332
+ */
333
+ handlePointerUp(event) {
334
+ if (!this.isSwiping ||
335
+ !this.swipeStartX ||
336
+ !this.swipeStartY ||
337
+ !this.swipeStartTime) {
338
+ this.resetSwipe();
339
+ return;
340
+ }
341
+ const x = event.clientX;
342
+ const y = event.clientY;
343
+ const deltaX = x - this.swipeStartX;
344
+ const deltaY = y - this.swipeStartY;
345
+ const deltaTime = Date.now() - this.swipeStartTime;
346
+ const distance = Math.abs(deltaX);
347
+ const velocity = distance / deltaTime;
348
+ // Only consider horizontal swipes (vertical movement should be less than horizontal)
349
+ if (Math.abs(deltaY) > Math.abs(deltaX)) {
350
+ this.resetSwipe();
351
+ return;
352
+ }
353
+ // Check if swipe meets threshold requirements
354
+ if (distance >= this.SWIPE_THRESHOLD ||
355
+ velocity >= this.SWIPE_VELOCITY_THRESHOLD) {
356
+ if (!this.open) {
357
+ // Opening swipe: from left edge going right, or from right edge going left
358
+ const isOpeningSwipe = (this.side === 'left' && deltaX > 0) ||
359
+ (this.side === 'right' && deltaX < 0);
360
+ if (isOpeningSwipe && !this.undismissable) {
361
+ this.show();
362
+ }
363
+ }
364
+ else {
365
+ // Closing swipe: towards the edge
366
+ const isClosingSwipe = (this.side === 'left' && deltaX < 0) ||
367
+ (this.side === 'right' && deltaX > 0);
368
+ if (isClosingSwipe && !this.undismissable) {
369
+ this.close();
370
+ }
371
+ }
372
+ }
373
+ this.resetSwipe();
374
+ }
375
+ /**
376
+ * Resets swipe tracking state.
377
+ */
378
+ resetSwipe() {
379
+ this.swipeStartX = null;
380
+ this.swipeStartY = null;
381
+ this.swipeStartTime = null;
382
+ this.isSwiping = false;
383
+ }
384
+ //#endregion LISTENERS
385
+ /****************************************************************************/
386
+ //#region LIFECYCLE
387
+ /**
388
+ * Lifecycle method that runs before the component loads.
389
+ * Initializes the trigger, header, and footer elements by finding them in the component's children.
390
+ * Elements are found either by their slot attribute or by their tag name (for drawer header/footer)
391
+ */
392
+ componentWillLoad() {
393
+ this.triggerElement = Array.from(this.el.children).find(child => {
394
+ return child.getAttribute('slot') === 'trigger';
395
+ });
396
+ this.headerElement = Array.from(this.el.children).find(child => {
397
+ return (child.getAttribute('slot') === 'header' ||
398
+ child.tagName.toLowerCase() === 'nv-drawerheader');
399
+ });
400
+ this.footerElement = Array.from(this.el.children).find(child => {
401
+ return (child.getAttribute('slot') === 'footer' ||
402
+ child.tagName.toLowerCase() === 'nv-drawerfooter');
403
+ });
404
+ // Initial form check
405
+ this.checkForForm();
406
+ }
407
+ componentWillUpdate() {
408
+ this.attachEventListeners();
409
+ }
410
+ componentDidLoad() {
411
+ if (this.open) {
412
+ this.show();
413
+ }
414
+ // Only set autofocus if the prop is true and no element already has autofocus
415
+ if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
416
+ this.setAutofocus();
417
+ }
418
+ this.attachEventListeners();
419
+ // Additional form check in case form was added after initial load
420
+ this.checkForForm();
421
+ // this.setupContentBodyListeners();
422
+ }
423
+ disconnectedCallback() {
424
+ if (this.triggerElement && !this.eventsAttached && !this.controlled) {
425
+ events_utilsB6GgGra_.removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
426
+ this.eventsAttached = false;
427
+ }
428
+ this.allowScroll();
429
+ }
430
+ //#endregion LIFECYCLE
431
+ /****************************************************************************/
432
+ //#region RENDER
433
+ render() {
434
+ const hasForm = this.form || this.el.querySelector('form');
435
+ const state = this.open ? 'open' : 'closed';
436
+ return (index.h(index.Host, { key: 'de12ca46afd89b287fc3f2b28e3f6ca79d328338' }, index.h("slot", { key: 'e7568c48a2a676d0f063831c769c1b4dfaee0925', name: "trigger" }), index.h("dialog", { key: '513b404bba6aa0b1d3831d17ef58e1c63fb6f757', ref: el => (this.dialogElement = el), onClose: this.handleDrawerClose, onClick: this.handleDrawerClick, role: "dialog", "aria-modal": "true", "aria-labelledby": "drawer-header", "aria-describedby": "drawer-content", class: clsxChV9xqsO.clsx({ [`side-${this.side}`]: true }), "data-state": state }, index.h("div", { key: '0b9c6fec78844a1e64b33a7bbab62ee44ac0d7bd', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: 'c74cb4b717f232b4622bd9391027c7b048e786e9', class: clsxChV9xqsO.clsx('content', `size-${this.size}`), ref: el => (this.contentElement = el), "data-state": state, "data-side": this.side, style: this.width ? { width: this.width } : {} }, !this.undismissable && (index.h("nv-button", { key: 'f9c03557a3ef3bb1d34e2b764d70a57cfd52dea3', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDrawerClose, "aria-label": "Close drawer" }, index.h("nv-icon", { key: '5c0ea22963bad0bb84eb58e9ad26ebfca6b11b94', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-drawerheader", { id: "drawer-header" })), index.h("div", { key: '813c7b985c6f75faa1fffc56e198957194bda87e', class: "content-body", id: "drawer-content" }, index.h("slot", { key: 'e70eefb8a94ae5e7eff32d5eb0446fba5c56065a' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-drawerfooter", { form: this.form, primaryButtonType: hasForm ? constantsBReL3Lsa.ButtonType.Submit : constantsBReL3Lsa.ButtonType.Button, onDrawerCanceled: this.handleDrawerClose, undismissable: this.undismissable })))))));
437
+ }
438
+ get el() { return index.getElement(this); }
439
+ static get watchers() { return {
440
+ "open": ["handleDrawerOpenChange"]
441
+ }; }
442
+ };
443
+ NvDrawer.style = nvDrawerCss;
444
+
445
+ exports.nv_drawer = NvDrawer;
@@ -0,0 +1,146 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-kU2nW5aN.js');
4
+ var constantsBReL3Lsa = require('./constants-BReL3Lsa-DpB_ghPF.js');
5
+ require('@stencil/react-output-target/runtime');
6
+ require('react');
7
+ require('react-dom');
8
+
9
+ const nvDrawerfooterCss = "nv-drawerfooter{display:flex;padding:var(--drawer-padding-y, var(--dialog-footer-padding-top)) var(--drawer-padding-x, var(--dialog-footer-padding-x)) var(--drawer-padding-y, var(--dialog-footer-padding-bottom)) var(--drawer-padding-x, var(--dialog-footer-padding-x));justify-content:flex-end;align-items:flex-end;gap:var(--drawer-gap-y, var(--dialog-footer-gap-y));align-self:stretch}";
10
+
11
+ const NvDrawerfooter = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.drawerCanceled = index.createEvent(this, "drawerCanceled", 3);
15
+ this.drawerPrimaryClicked = index.createEvent(this, "drawerPrimaryClicked", 3);
16
+ if (hostRef.$hostElement$["s-ei"]) {
17
+ this.internals = hostRef.$hostElement$["s-ei"];
18
+ }
19
+ else {
20
+ this.internals = hostRef.$hostElement$.attachInternals();
21
+ hostRef.$hostElement$["s-ei"] = this.internals;
22
+ }
23
+ this.hasSlot = false;
24
+ /****************************************************************************/
25
+ //#region PROPERTIES
26
+ /**
27
+ * Disables the primary button, preventing user interaction.
28
+ */
29
+ this.disabled = false;
30
+ /**
31
+ * Controls the visibility of the cancel button. When true, the cancel button is
32
+ * hidden.
33
+ */
34
+ this.undismissable = false;
35
+ /**
36
+ * Sets the leading icon for the primary button.
37
+ */
38
+ this.leadingIcon = null;
39
+ /**
40
+ * Sets the trailing icon for the primary button.
41
+ */
42
+ this.trailingIcon = null;
43
+ /**
44
+ * Sets the danger state for the primary button.
45
+ */
46
+ this.danger = false;
47
+ /**
48
+ * Sets the label for the cancel button.
49
+ */
50
+ this.cancelLabel = 'Cancel';
51
+ /**
52
+ * Sets the label for the primary button.
53
+ */
54
+ this.primaryLabel = 'Primary';
55
+ /**
56
+ * A form inside the drawer can be submitted through the drawer footer by
57
+ * giving the form an id and passing that id to the form attribute.
58
+ */
59
+ this.form = null;
60
+ //#endregion EVENTS
61
+ /****************************************************************************/
62
+ //#region METHODS
63
+ /**
64
+ * Handles the primary action when the primary button is clicked.
65
+ * @param {Event} event - The click event.
66
+ */
67
+ this.handlePrimary = (event) => {
68
+ event.stopPropagation();
69
+ this.drawerPrimaryClicked.emit();
70
+ };
71
+ /**
72
+ * Handles the cancel action when the cancel button is clicked. This will close the drawer.
73
+ * @param {Event} event - The click event.
74
+ */
75
+ this.handleCancel = (event) => {
76
+ event.stopPropagation();
77
+ this.drawerCanceled.emit();
78
+ };
79
+ }
80
+ //#endregion METHODS
81
+ /****************************************************************************/
82
+ //#region LIFECYCLE
83
+ componentWillLoad() {
84
+ // Check if there are any child elements that don't have a slot attribute
85
+ this.hasSlot = Array.from(this.el.childNodes).some(node => {
86
+ return (node.nodeType === Node.ELEMENT_NODE &&
87
+ !node.hasAttribute('slot'));
88
+ });
89
+ }
90
+ componentDidLoad() {
91
+ // Set the default button type based on the form property
92
+ this.primaryButtonType =
93
+ this.primaryButtonType || this.form
94
+ ? constantsBReL3Lsa.ButtonType.Submit
95
+ : constantsBReL3Lsa.ButtonType.Button;
96
+ }
97
+ //#endregion LIFECYCLE
98
+ /****************************************************************************/
99
+ //#region RENDER
100
+ render() {
101
+ return (index.h(index.Host, { key: '75b11ed4b84aa602f76895c473595423d38cc21d' }, !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))));
102
+ }
103
+ static get formAssociated() { return true; }
104
+ get el() { return index.getElement(this); }
105
+ };
106
+ NvDrawerfooter.style = nvDrawerfooterCss;
107
+
108
+ const nvDrawerheaderCss = "nv-drawerheader{padding:var(--drawer-padding-y, var(--dialog-header-padding-top)) var(--drawer-padding-x, var(--dialog-header-padding-x)) var(--drawer-padding-y, var(--dialog-header-padding-bottom)) var(--drawer-padding-x, var(--dialog-header-padding-x));justify-content:space-between;align-items:flex-start;align-self:stretch}nv-drawerheader:has(>div:not(.heading):not(.subheading)){padding:0}nv-drawerheader>div[style*=gradient]{background-attachment:local}nv-drawerheader .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(--drawer-header-padding-right, var(--spacing-7));line-height:var(--leading-px-6);letter-spacing:var(--letter-spacing-heading-xs)}nv-drawerheader .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);}";
109
+
110
+ const NvDrawerheader = class {
111
+ constructor(hostRef) {
112
+ index.registerInstance(this, hostRef);
113
+ this.hasSlot = false;
114
+ /****************************************************************************/
115
+ //#region PROPERTIES
116
+ /**
117
+ * Sets the heading text for the drawer.
118
+ */
119
+ this.heading = 'Drawer Title';
120
+ /**
121
+ * Sets the subheading text for the drawer.
122
+ */
123
+ this.subheading = null;
124
+ }
125
+ //#endregion PROPERTIES
126
+ /****************************************************************************/
127
+ //#region LIFECYCLE
128
+ componentWillLoad() {
129
+ // Check if there are any child elements that don't have a slot attribute
130
+ this.hasSlot = Array.from(this.el.childNodes).some(node => {
131
+ return (node.nodeType === Node.ELEMENT_NODE &&
132
+ !node.hasAttribute('slot'));
133
+ });
134
+ }
135
+ //#endregion LIFECYCLE
136
+ /****************************************************************************/
137
+ //#region RENDER
138
+ render() {
139
+ return (index.h(index.Host, { key: 'c61401c90c57982a645f703ae1e0bab4e7fcd3ff' }, !this.hasSlot ? (index.h(index.Fragment, null, index.h("div", { class: "heading" }, this.heading), index.h("div", { class: "subheading" }, this.subheading))) : (index.h("slot", null))));
140
+ }
141
+ get el() { return index.getElement(this); }
142
+ };
143
+ NvDrawerheader.style = nvDrawerheaderCss;
144
+
145
+ exports.nv_drawerfooter = NvDrawerfooter;
146
+ exports.nv_drawerheader = NvDrawerheader;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CtjeeUI-.js');
3
+ var index = require('./index-kU2nW5aN.js');
4
4
  var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
5
5
  var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
6
6
  require('@stencil/react-output-target/runtime');
@@ -156,15 +156,15 @@ const NvFieldcheckbox = class {
156
156
  ? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
157
157
  : undefined;
158
158
  const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
159
- return (index.h(index.Host, { key: 'f3048e237f3e1b4007ed4b3a885aa3743d97f944', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("div", { key: '294e57442ee4d4529ecd68e515f508c753b2710f', class: "input-container" }, index.h("input", Object.assign({ key: '9c0f7ded57a973da45f12768e5a6e0dcb62ce259', type: "checkbox", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly && !useNativeRequired, required: useNativeRequired ? this.required : undefined }, (ariaRequiredValue !== undefined && {
160
- 'aria-required': String(ariaRequiredValue),
161
- }), { indeterminate: this.indeterminate, ref: el => {
159
+ return (index.h(index.Host, { key: 'a652f9f7dcf00323548c79c9ca1f5fe1ef403279', class: clsxChV9xqsO.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("div", { key: '84057811ecdd93b46e4f33868e8c8cc0ea340125', class: "input-container" }, index.h("input", { key: 'da53b190076395852c2f08be8da16c3a9c53fbaa', type: "checkbox", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly && !useNativeRequired, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
160
+ 'aria-required': String(ariaRequiredValue),
161
+ }), indeterminate: this.indeterminate, ref: el => {
162
162
  if (el) {
163
163
  el.indeterminate = this.indeterminate;
164
164
  }
165
- } })), index.h("span", { key: '223c55fdf2a6f903983cc3d3864e1e39d4e7ec04', class: "icon" }, this.checked && !this.indeterminate && (index.h("slot", { key: '336e037d31cb2b52745977a54ca997af5e45304b', name: "checked-icon" }, index.h("svg", { key: '08e6e90c23787f057c3bf0aa6cfbc9a45b5122b9', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: 'b14e12fec6247aa3aa8da36bcaa0dab6edabaa96', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (index.h("slot", { key: 'b5c30541e74b920ec41a1fe5c35805cea134d336', name: "indeterminate-icon" }, index.h("svg", { key: '54bcb60835d919f4a7b4897fc567c9adab4e05c1', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: '62ade78b9f33727aba129e6e4d5c219d4bbd03f1', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), index.h("slot", { key: 'cb6cc3dbcf226dcf5ddb1fa871d43ca19726a3a8' }), index.h("div", { key: '44634c846b5d09d71b6c27a8c9934acf12261105', class: "text-container" }, index.h("slot", { key: '2aa6f2e956088f5856f56888def6f728c815293c', name: "main" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'e417e4cb783a1076b35f5566f2f25ab06063d8d5', htmlFor: this.inputId, class: clsxChV9xqsO.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '61eaf3fd5ca61d0cba524786c288d6b3836bb947', name: "label" }, this.label))), (this.description ||
166
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '43fdb9fb7a6af7c1d2bac659c3195e1b1988d083', class: "description" }, index.h("slot", { key: '7e332245bbefe3686fc71560010ab237217bb8f8', name: "description" }, this.description)))), (this.errorDescription ||
167
- this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'a2dc29465f01262b147345fa8897dbcca7b77458', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'e696d1fe9d833fec7b779bf0b5191dd0eab2908e', name: "error-description" }, this.errorDescription))))));
165
+ } }), index.h("span", { key: 'c1263f5094377623504381d52b78769033d13a63', class: "icon" }, this.checked && !this.indeterminate && (index.h("slot", { key: '49f9639d08ade9a197e283d3677d294ae01369e9', name: "checked-icon" }, index.h("svg", { key: '9ad3cefe29f5e12d26912679d290441e6f9765d0', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: 'b3cf7a393ee5b797310ad338afb5abd3bfd9cfaa', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (index.h("slot", { key: 'e4a615810324cdc3a14d11dcdaf2e06c9ea8538e', name: "indeterminate-icon" }, index.h("svg", { key: '50230f9244694641bbb38411a886e563dc5952f5', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: '8cfb893ef82d5d91c270bc5c029d320a8ca7f276', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), index.h("slot", { key: '328cef43f740ad18f2666805ba9e755687aa987c' }), index.h("div", { key: 'b380cefbf5c97d62d77b9940ef2e241c22764302', class: "text-container" }, index.h("slot", { key: 'd3f7fb813ada2cfef74e6068eb5a1304bc28396a', name: "main" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'cf7d3f46915b2d149c6dc4c7cce3b3741c3e952f', htmlFor: this.inputId, class: clsxChV9xqsO.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '9c57662513ef680545bcdf8d93c7e92ce4259054', name: "label" }, this.label))), (this.description ||
166
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '352e1a7f2a09867e36d91f16102ea8be158d0ad7', class: "description" }, index.h("slot", { key: '79e8d147440e4563ca8e966b4f553307c7b5ec1a', name: "description" }, this.description)))), (this.errorDescription ||
167
+ this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'a8cb608dd9f36efedbfb6f82042c61a487ad227f', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '3720f914db04c45cb2e5323a129dd05c9ce3fdfb', name: "error-description" }, this.errorDescription))))));
168
168
  }
169
169
  static get formAssociated() { return true; }
170
170
  get el() { return index.getElement(this); }