@nova-design-system/nova-react 3.23.0 → 3.25.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.
- package/README.md +1 -0
- package/dist/cjs/dom.utils-CuXVGECR-8VY5SfMZ.js +177 -0
- package/dist/cjs/events.utils-B6GgGra--01N__3wY.js +23 -0
- package/dist/cjs/generated/components.server.js +124 -58
- package/dist/cjs/{grow.animation-CvHGHBL4-DDIEYBK-.js → grow.animation-D7ep_aVl-BuXEDSK-.js} +0 -21
- package/dist/cjs/{i18n.utils-DOZbXX2L-BizoXo6c.js → i18n.utils-IlwlcG9l-ku0bScip.js} +14 -18
- package/dist/cjs/index-DUlunl9a.js +9696 -0
- package/dist/cjs/{nv-dialog.entry-O47Eol_7.js → index.esm-D3eWMME9-CG1TVKfu.js} +1 -296
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/{nv-accordion-item.entry-B_l0-ux0.js → nv-accordion-item.entry-CqnjIt4R.js} +8 -7
- package/dist/cjs/{nv-accordion.entry-BX8_YuZF.js → nv-accordion.entry-Dx7FmGg_.js} +11 -14
- package/dist/cjs/{nv-alert.entry-DCWYR0OK.js → nv-alert.entry-BL3Pdcxd.js} +7 -6
- package/dist/cjs/nv-avatar.entry-2dFR4I9_.js +68 -0
- package/dist/cjs/nv-badge_2.entry-5FShR2Ax.js +218 -0
- package/dist/cjs/nv-breadcrumb.entry-Cfi32bBT.js +49 -0
- package/dist/cjs/nv-breadcrumbs.entry-BSgn3KUO.js +21 -0
- package/dist/cjs/nv-button.entry-BdQQ_LE7.js +166 -0
- package/dist/cjs/{nv-buttongroup.entry-BZaTKN_n.js → nv-buttongroup.entry-BM8CwXFK.js} +13 -7
- package/dist/cjs/{nv-calendar.entry-D9ESuu7C.js → nv-calendar.entry-CeKsMGOa.js} +39 -32
- package/dist/cjs/nv-col.entry-D-h2PGcz.js +38 -0
- package/dist/cjs/{nv-datagrid.entry-DcB5q2oC.js → nv-datagrid.entry-nOBIfqOS.js} +113 -255
- package/dist/cjs/{nv-datagridcolumn.entry-BhKOzXA6.js → nv-datagridcolumn.entry-BAzTU_KM.js} +2 -2
- package/dist/cjs/nv-dialog.entry-Bi2ZVSe2.js +299 -0
- package/dist/cjs/{nv-dialogfooter_2.entry-Dn16bI8a.js → nv-dialogfooter_2.entry-D6lzC-3S.js} +11 -29
- package/dist/cjs/nv-drawer.entry-Dp4AfBiF.js +445 -0
- package/dist/cjs/nv-drawerfooter_2.entry-DpWSsq6d.js +128 -0
- package/dist/cjs/nv-fieldcheckbox.entry-COA3LXnX.js +179 -0
- package/dist/cjs/{nv-fielddate.entry-B4P0U8QG.js → nv-fielddate.entry-B8r5RFXd.js} +20 -21
- package/dist/cjs/{nv-fielddaterange.entry-BORwYJ-k.js → nv-fielddaterange.entry-C6_Kq93P.js} +20 -19
- package/dist/cjs/{nv-fielddropdown.entry-DzBAIynY.js → nv-fielddropdown.entry-B2Dr5zHd.js} +51 -58
- package/dist/cjs/nv-fielddropdownitem.entry-DapivVnR.js +69 -0
- package/dist/cjs/{nv-fieldmultiselect.entry-DiqRreWh.js → nv-fieldmultiselect.entry-DSpQeiPx.js} +45 -49
- package/dist/cjs/nv-fieldnumber.entry-BwxR9sRr.js +189 -0
- package/dist/cjs/nv-fieldpassword.entry-BOSU-Skh.js +167 -0
- package/dist/cjs/nv-fieldradio.entry-ZFafNY5_.js +105 -0
- package/dist/cjs/nv-fieldselect.entry-CfWjQAd9.js +405 -0
- package/dist/cjs/{nv-fieldslider.entry-CozmnUfN.js → nv-fieldslider.entry-dDPcWUxs.js} +34 -16
- package/dist/cjs/nv-fieldtext.entry-Yaa-mkjJ.js +163 -0
- package/dist/cjs/{nv-fieldtextarea.entry-7UrKWDHg.js → nv-fieldtextarea.entry-Dp_l2pKZ.js} +18 -13
- package/dist/cjs/{nv-fieldtime.entry-DakOlLiO.js → nv-fieldtime.entry-CWxi4Uel.js} +38 -40
- package/dist/cjs/{nv-icon.entry-Db00kB2u.js → nv-icon.entry-Dci11W9S.js} +5 -5
- package/dist/cjs/nv-iconbutton_2.entry-A6FKFJT_.js +171 -0
- package/dist/cjs/{nv-menu.entry-CK2HdmBt.js → nv-menu.entry-BHaYP-9M.js} +11 -16
- package/dist/cjs/nv-menuitem.entry-Cm1vvN25.js +59 -0
- package/dist/cjs/nv-notification-bullet.entry-DRlS3Ybc.js +76 -0
- package/dist/cjs/nv-notification.entry-BeDmR-XC.js +176 -0
- package/dist/cjs/nv-notificationcontainer.entry-C3p_87Dg.js +41 -0
- package/dist/cjs/nv-paginationtable.entry-BzEqQOBa.js +231 -0
- package/dist/cjs/{nv-popover.entry-mLdLSp6n.js → nv-popover.entry-D2oFn9vL.js} +118 -46
- package/dist/cjs/nv-row.entry-hV1kxmrr.js +22 -0
- package/dist/cjs/{nv-sidebar.entry-inDVNJ4s.js → nv-sidebar.entry-BJrqJ8K7.js} +12 -8
- package/dist/cjs/nv-sidebarcontent.entry-CPfGF7nx.js +22 -0
- package/dist/cjs/{nv-sidebardivider.entry-D_yern0R.js → nv-sidebardivider.entry-D2wmzHCO.js} +4 -4
- package/dist/cjs/{nv-sidebarfooter.entry-Rkkn9TB_.js → nv-sidebarfooter.entry-C7fqCzjH.js} +4 -4
- package/dist/cjs/nv-sidebargroup.entry-qkXnxhs_.js +23 -0
- package/dist/cjs/{nv-sidebarheader.entry-CYpD_4pI.js → nv-sidebarheader.entry-DBsOmyQ0.js} +4 -4
- package/dist/cjs/{nv-sidebarlogo.entry-BgK03M1v.js → nv-sidebarlogo.entry-902Ht3UR.js} +4 -4
- package/dist/cjs/{nv-sidebarnavitem.entry-DglvcCOD.js → nv-sidebarnavitem.entry-CICrllp8.js} +11 -10
- package/dist/cjs/nv-sidebarnavsubitem.entry-Q9jjU_7D.js +35 -0
- package/dist/cjs/{nv-split.entry-mzg2F66T.js → nv-split.entry-BYIsE2wp.js} +51 -45
- package/dist/cjs/nv-stack.entry-DgE5ASGH.js +31 -0
- package/dist/cjs/{nv-table.entry-DkbNgxtI.js → nv-table.entry-DHXBu2n1.js} +9 -11
- package/dist/cjs/{nv-tableheader.entry-CRVFTQA-.js → nv-tableheader.entry-BijgOxcO.js} +5 -5
- package/dist/cjs/nv-toggle.entry-CMI1WdvV.js +82 -0
- package/dist/cjs/nv-togglebutton.entry-DAPETEmF.js +66 -0
- package/dist/cjs/{nv-togglebuttongroup.entry-BYXX5ejg.js → nv-togglebuttongroup.entry-CzDI1XCr.js} +14 -11
- package/dist/cjs/nv-tooltip.entry-DPoUP9iL.js +56 -0
- package/dist/cjs/slide.animation-CmH5d1of-BZuw607U.js +90 -0
- package/dist/components/NvDatatable/NvDatatable.js +69 -32
- package/dist/generated/components.js +38 -0
- package/dist/generated/components.server.js +120 -58
- package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
- package/dist/types/components/NvDatatable/types.d.ts +13 -3
- package/dist/types/generated/components.d.ts +63 -43
- package/dist/types/generated/components.server.d.ts +63 -43
- package/package.json +2 -2
- package/dist/cjs/index-CtjeeUI-.js +0 -39617
- package/dist/cjs/nv-avatar.entry-C_xZD3Lp.js +0 -68
- package/dist/cjs/nv-badge_2.entry-JjqANStV.js +0 -213
- package/dist/cjs/nv-breadcrumb.entry-DQZDn6cm.js +0 -46
- package/dist/cjs/nv-breadcrumbs.entry-Bz0GjhY_.js +0 -21
- package/dist/cjs/nv-button.entry-Br1DH9Vj.js +0 -164
- package/dist/cjs/nv-col.entry-CfgPMMxS.js +0 -38
- package/dist/cjs/nv-fieldcheckbox.entry-Bx6ArV_b.js +0 -177
- package/dist/cjs/nv-fielddropdownitem.entry-C_17isWd.js +0 -73
- package/dist/cjs/nv-fieldnumber.entry-C9O4UPp3.js +0 -187
- package/dist/cjs/nv-fieldpassword.entry-BfVJNT0A.js +0 -165
- package/dist/cjs/nv-fieldradio.entry-CG22oETM.js +0 -103
- package/dist/cjs/nv-fieldselect.entry-BPQEtrv2.js +0 -397
- package/dist/cjs/nv-fieldtext.entry-BD-z01ru.js +0 -163
- package/dist/cjs/nv-iconbutton_2.entry-CaKCa8NT.js +0 -168
- package/dist/cjs/nv-menuitem.entry-mKMqCAdz.js +0 -60
- package/dist/cjs/nv-notification-bullet.entry-DtbjtFxs.js +0 -77
- package/dist/cjs/nv-notification.entry-CLb0gNu3.js +0 -262
- package/dist/cjs/nv-notificationcontainer.entry-Cijivlm6.js +0 -41
- package/dist/cjs/nv-row.entry-C2C94fcv.js +0 -22
- package/dist/cjs/nv-sidebarcontent.entry-DxoljE15.js +0 -22
- package/dist/cjs/nv-sidebargroup.entry-C1p9qqxr.js +0 -23
- package/dist/cjs/nv-sidebarnavsubitem.entry-Dt1jKmC-.js +0 -35
- package/dist/cjs/nv-stack.entry-nnvjTrBy.js +0 -31
- package/dist/cjs/nv-toggle.entry-oC9TVkr1.js +0 -80
- package/dist/cjs/nv-togglebutton.entry-BTWCzbS9.js +0 -67
- package/dist/cjs/nv-tooltip.entry-OJGxfJEh.js +0 -55
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DUlunl9a.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
|
+
* Looks for passed header, and footer elements, either by their slot
|
|
390
|
+
* attribute or by their tag name (for dialog header/footer)
|
|
391
|
+
*/
|
|
392
|
+
componentWillLoad() {
|
|
393
|
+
if (!this.headerElement)
|
|
394
|
+
this.headerElement =
|
|
395
|
+
this.el.querySelector('[slot="header"]') ??
|
|
396
|
+
this.el.querySelector('nv-drawerheader');
|
|
397
|
+
if (!this.footerElement)
|
|
398
|
+
this.footerElement =
|
|
399
|
+
this.el.querySelector('[slot="footer"]') ??
|
|
400
|
+
this.el.querySelector('nv-drawerfooter');
|
|
401
|
+
// Initial form check
|
|
402
|
+
this.checkForForm();
|
|
403
|
+
}
|
|
404
|
+
componentDidRender() {
|
|
405
|
+
this.triggerElement = this.el.querySelector('[slot="trigger"]');
|
|
406
|
+
this.attachEventListeners();
|
|
407
|
+
}
|
|
408
|
+
componentDidLoad() {
|
|
409
|
+
if (this.open) {
|
|
410
|
+
this.show();
|
|
411
|
+
}
|
|
412
|
+
// Only set autofocus if the prop is true and no element already has autofocus
|
|
413
|
+
if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
|
|
414
|
+
this.setAutofocus();
|
|
415
|
+
}
|
|
416
|
+
this.attachEventListeners();
|
|
417
|
+
// Additional form check in case form was added after initial load
|
|
418
|
+
this.checkForForm();
|
|
419
|
+
// this.setupContentBodyListeners();
|
|
420
|
+
}
|
|
421
|
+
disconnectedCallback() {
|
|
422
|
+
if (this.triggerElement && !this.eventsAttached && !this.controlled) {
|
|
423
|
+
events_utilsB6GgGra_.removeEventListeners(this.triggerClickEvents, this.triggerElement, this);
|
|
424
|
+
this.eventsAttached = false;
|
|
425
|
+
}
|
|
426
|
+
this.allowScroll();
|
|
427
|
+
}
|
|
428
|
+
//#endregion LIFECYCLE
|
|
429
|
+
/****************************************************************************/
|
|
430
|
+
//#region RENDER
|
|
431
|
+
render() {
|
|
432
|
+
const hasForm = this.form || this.el.querySelector('form');
|
|
433
|
+
const state = this.open ? 'open' : 'closed';
|
|
434
|
+
return (index.h(index.Host, { key: '24fef2e07989d6b9648d8c4c7374680650ac09e8' }, index.h("slot", { key: 'c8d25517097b715cf42ad3a60ea84c7efb052c6c', name: "trigger" }), index.h("dialog", { key: 'b9b94f73fa04bb421b70a1af4c3c40171af94008', 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: '4867741abdaa5608992dd812311a43ce3af0c94e', class: "backdrop", ref: el => (this.backdropElement = el) }, index.h("div", { key: '476ac6bb40bb342ffb305faca2e67a8bef43f14e', 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: '90d1a2c776d486ee98d4b847ee1d43616c15d86c', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDrawerClose, "aria-label": "Close drawer" }, index.h("nv-icon", { key: '5c54095bae68cc0780a95fd541a8e607f430ebb9', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-drawerheader", { id: "drawer-header" })), index.h("div", { key: 'fcf2ccf83679fa5a702ce02206144a3a11ab53bf', class: "content-body", id: "drawer-content" }, index.h("slot", { key: 'b70b2edfb51da8a16f996c90d04391657718a12a' })), 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 })))))));
|
|
435
|
+
}
|
|
436
|
+
get el() { return index.getElement(this); }
|
|
437
|
+
static get watchers() { return {
|
|
438
|
+
"open": [{
|
|
439
|
+
"handleDrawerOpenChange": 0
|
|
440
|
+
}]
|
|
441
|
+
}; }
|
|
442
|
+
};
|
|
443
|
+
NvDrawer.style = nvDrawerCss();
|
|
444
|
+
|
|
445
|
+
exports.nv_drawer = NvDrawer;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DUlunl9a.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
|
+
/****************************************************************************/
|
|
24
|
+
//#region PROPERTIES
|
|
25
|
+
/**
|
|
26
|
+
* Disables the primary button, preventing user interaction.
|
|
27
|
+
*/
|
|
28
|
+
this.disabled = false;
|
|
29
|
+
/**
|
|
30
|
+
* Controls the visibility of the cancel button. When true, the cancel button is
|
|
31
|
+
* hidden.
|
|
32
|
+
*/
|
|
33
|
+
this.undismissable = false;
|
|
34
|
+
/**
|
|
35
|
+
* Sets the leading icon for the primary button.
|
|
36
|
+
*/
|
|
37
|
+
this.leadingIcon = null;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the trailing icon for the primary button.
|
|
40
|
+
*/
|
|
41
|
+
this.trailingIcon = null;
|
|
42
|
+
/**
|
|
43
|
+
* Sets the danger state for the primary button.
|
|
44
|
+
*/
|
|
45
|
+
this.danger = false;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the label for the cancel button.
|
|
48
|
+
*/
|
|
49
|
+
this.cancelLabel = 'Cancel';
|
|
50
|
+
/**
|
|
51
|
+
* Sets the label for the primary button.
|
|
52
|
+
*/
|
|
53
|
+
this.primaryLabel = 'Primary';
|
|
54
|
+
/**
|
|
55
|
+
* A form inside the drawer can be submitted through the drawer footer by
|
|
56
|
+
* giving the form an id and passing that id to the form attribute.
|
|
57
|
+
*/
|
|
58
|
+
this.form = null;
|
|
59
|
+
//#endregion EVENTS
|
|
60
|
+
/****************************************************************************/
|
|
61
|
+
//#region METHODS
|
|
62
|
+
/**
|
|
63
|
+
* Handles the primary action when the primary button is clicked.
|
|
64
|
+
* @param {Event} event - The click event.
|
|
65
|
+
*/
|
|
66
|
+
this.handlePrimary = (event) => {
|
|
67
|
+
event.stopPropagation();
|
|
68
|
+
this.drawerPrimaryClicked.emit();
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Handles the cancel action when the cancel button is clicked. This will close the drawer.
|
|
72
|
+
* @param {Event} event - The click event.
|
|
73
|
+
*/
|
|
74
|
+
this.handleCancel = (event) => {
|
|
75
|
+
event.stopPropagation();
|
|
76
|
+
this.drawerCanceled.emit();
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//#endregion METHODS
|
|
80
|
+
/****************************************************************************/
|
|
81
|
+
//#region LIFECYCLE
|
|
82
|
+
componentDidRender() {
|
|
83
|
+
// Set the default button type based on the form property
|
|
84
|
+
if (!this.primaryButtonType) {
|
|
85
|
+
this.primaryButtonRef.type = this.form
|
|
86
|
+
? constantsBReL3Lsa.ButtonType.Submit
|
|
87
|
+
: constantsBReL3Lsa.ButtonType.Button;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//#endregion LIFECYCLE
|
|
91
|
+
/****************************************************************************/
|
|
92
|
+
//#region RENDER
|
|
93
|
+
render() {
|
|
94
|
+
return (index.h(index.Host, { key: '1a15bd9a6bac74ceb64d57ef7830e4ff8d081770' }, index.h("slot", { key: '72f762cc6d64cc286252da929111b0e86013194f' }, index.h(index.Fragment, { key: '21d8100769c0f84dd5fee916bad8021190f08703' }, !this.undismissable && (index.h("nv-button", { key: '3c5e445643fa1b01fef28fc53f60ffb0d2f6f94c', onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), index.h("nv-button", { key: 'd93583226649f6ac4928c9359d5f0654e0bb6714', ref: el => (this.primaryButtonRef = el), 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", { key: '4d292e8a54df0b1dbdac0ace38dac7f24224ebe2', slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (index.h("nv-icon", { key: '412d46f4ef9ef573234b70a1456a91dda1569936', slot: "trailing-icon", name: this.trailingIcon, size: "sm" })))))));
|
|
95
|
+
}
|
|
96
|
+
static get formAssociated() { return true; }
|
|
97
|
+
get el() { return index.getElement(this); }
|
|
98
|
+
};
|
|
99
|
+
NvDrawerfooter.style = nvDrawerfooterCss();
|
|
100
|
+
|
|
101
|
+
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);}`;
|
|
102
|
+
|
|
103
|
+
const NvDrawerheader = class {
|
|
104
|
+
constructor(hostRef) {
|
|
105
|
+
index.registerInstance(this, hostRef);
|
|
106
|
+
/****************************************************************************/
|
|
107
|
+
//#region PROPERTIES
|
|
108
|
+
/**
|
|
109
|
+
* Sets the heading text for the drawer.
|
|
110
|
+
*/
|
|
111
|
+
this.heading = 'Drawer Title';
|
|
112
|
+
/**
|
|
113
|
+
* Sets the subheading text for the drawer.
|
|
114
|
+
*/
|
|
115
|
+
this.subheading = null;
|
|
116
|
+
}
|
|
117
|
+
//#endregion PROPERTIES
|
|
118
|
+
/****************************************************************************/
|
|
119
|
+
//#region RENDER
|
|
120
|
+
render() {
|
|
121
|
+
return (index.h(index.Host, { key: '1c9cd7b1157e63563f07b5b4b58a694b3ee4094d' }, index.h("slot", { key: '97c4b5cd72c240ff25d7f8aa7801a1d68c5ea073' }, index.h(index.Fragment, { key: '75896e1efe1ebe98c3275214d6aaea253afefce0' }, index.h("div", { key: '5bf874923f7cdff2cadcb8d9a352812ee532132d', class: "heading" }, this.heading), index.h("div", { key: '7ca0080c00eaa1bc68df9efe7aeb6ff57da13730', class: "subheading" }, this.subheading)))));
|
|
122
|
+
}
|
|
123
|
+
get el() { return index.getElement(this); }
|
|
124
|
+
};
|
|
125
|
+
NvDrawerheader.style = nvDrawerheaderCss();
|
|
126
|
+
|
|
127
|
+
exports.nv_drawerfooter = NvDrawerfooter;
|
|
128
|
+
exports.nv_drawerheader = NvDrawerheader;
|