@nova-design-system/nova-react 3.12.0 → 3.13.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 +27 -58
- package/dist/cjs/collapse.animation-acda1bf5-BuORVmQv.js +214 -0
- package/dist/cjs/{constants-a857c476-Cj2b-su0.js → constants-d0f19e7b-s0SCO_vi.js} +5 -0
- package/dist/cjs/fade.animation-eb454088-Bma0SpTf.js +724 -0
- package/dist/cjs/{index-jBgPO7HC.js → index-Jgn7NELT.js} +2090 -1681
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/{nv-accordion-item.entry-BUb_Apy8.js → nv-accordion-item.entry-C7vVmDCg.js} +74 -40
- package/dist/cjs/nv-accordion.entry-CFynyAOo.js +178 -0
- package/dist/cjs/{nv-alert.entry-nzJu8E5h.js → nv-alert.entry-C_FMs0Yi.js} +20 -20
- package/dist/cjs/{nv-avatar.entry-BPp1d-QO.js → nv-avatar.entry-BvjSzIHn.js} +7 -7
- package/dist/cjs/{nv-badge_2.entry-Bk56p4jv.js → nv-badge_2.entry-CLNvgVtj.js} +11 -11
- package/dist/cjs/{nv-breadcrumb.entry-DB3zR7FC.js → nv-breadcrumb.entry-Ch2Cvr_a.js} +1 -1
- package/dist/cjs/{nv-breadcrumbs.entry-CoGgEsro.js → nv-breadcrumbs.entry-DmH8AGIm.js} +1 -1
- package/dist/cjs/{nv-button.entry-psZ3_t6i.js → nv-button.entry-B0lusQ2w.js} +7 -7
- package/dist/cjs/{nv-buttongroup.entry-cNenBx1F.js → nv-buttongroup.entry-DLVCcdh9.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-nkrORr_V.js → nv-calendar.entry-BmX0f_Or.js} +20 -16
- package/dist/cjs/{nv-col.entry-D4mInxLU.js → nv-col.entry-lysICYEC.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-D50O7eyc.js → nv-datagrid.entry-vG3h5dj3.js} +6 -6
- package/dist/cjs/{nv-datagridcolumn.entry-BuGX-3ev.js → nv-datagridcolumn.entry-9NynF9K-.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-yiZIq-TV.js → nv-dialog.entry-Ctsz1K-O.js} +3 -3
- package/dist/cjs/{nv-dialogfooter_2.entry-C9ykJQK6.js → nv-dialogfooter_2.entry-B17HEgyc.js} +10 -7
- package/dist/cjs/{nv-fieldcheckbox.entry-CCRvvFJ3.js → nv-fieldcheckbox.entry-DMiADwqV.js} +1 -1
- package/dist/cjs/{nv-fielddate.entry-C4k6k980.js → nv-fielddate.entry-D3X6Jl3u.js} +1 -1
- package/dist/cjs/{nv-fielddaterange.entry-BhfV2KCd.js → nv-fielddaterange.entry-C8_SFFXW.js} +1 -1
- package/dist/cjs/{nv-fielddropdown.entry-Xkkvl_gb.js → nv-fielddropdown.entry-BiBR8Qgs.js} +1 -1
- package/dist/cjs/{nv-fielddropdownitem.entry-Ckwq6k6r.js → nv-fielddropdownitem.entry-DQ8QK4AS.js} +1 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-D4PgRSFv.js → nv-fieldmultiselect.entry-J5VTOPum.js} +1 -31
- package/dist/cjs/{nv-fieldnumber.entry-BEnJ81XX.js → nv-fieldnumber.entry-Djpg1HMq.js} +2 -2
- package/dist/cjs/{nv-fieldpassword.entry-elzveqP8.js → nv-fieldpassword.entry-DKT9Xn5H.js} +1 -1
- package/dist/cjs/{nv-fieldradio.entry-xJpdsXGo.js → nv-fieldradio.entry-CPYf3K2o.js} +1 -1
- package/dist/cjs/{nv-fieldselect.entry-DVyO7LMD.js → nv-fieldselect.entry-DnbL7aZB.js} +1 -1
- package/dist/cjs/{nv-fieldslider.entry-O4TFO-Rl.js → nv-fieldslider.entry-CNRJuo7v.js} +25 -17
- package/dist/cjs/{nv-fieldtext.entry-p-9GEp1g.js → nv-fieldtext.entry-B9lIHck7.js} +1 -1
- package/dist/cjs/{nv-fieldtextarea.entry-Cvik8cci.js → nv-fieldtextarea.entry-B2EDj8cm.js} +1 -1
- package/dist/cjs/{nv-fieldtime.entry-mnsDon9M.js → nv-fieldtime.entry-CpoXpAPx.js} +60 -60
- package/dist/cjs/{nv-icon.entry-CrgnozDL.js → nv-icon.entry-DbOeEd4f.js} +7 -7
- package/dist/cjs/{nv-iconbutton_2.entry-M5EY3-1s.js → nv-iconbutton_2.entry-DR_wR73O.js} +1 -1
- package/dist/cjs/{nv-menu.entry-D7bORqXp.js → nv-menu.entry-DB_G8hS_.js} +1 -1
- package/dist/cjs/{nv-menuitem.entry-CaN6qNoB.js → nv-menuitem.entry-PBCNIzPI.js} +1 -1
- package/dist/cjs/nv-notification.entry-CyumbQS_.js +178 -0
- package/dist/cjs/{nv-popover.entry-DGeXSyhZ.js → nv-popover.entry-ttESQMgj.js} +9 -9
- package/dist/cjs/{nv-row.entry-B17DsCjM.js → nv-row.entry-DPEGaFeS.js} +2 -2
- package/dist/cjs/{nv-stack.entry-Dv3YU4nJ.js → nv-stack.entry-CTPwlz23.js} +2 -2
- package/dist/cjs/{nv-table.entry-BILyG-43.js → nv-table.entry-Dv1mZKcu.js} +3 -3
- package/dist/cjs/{nv-tablecolumn.entry-II6Z_gdO.js → nv-tablecolumn.entry-DrAaeHm-.js} +1 -1
- package/dist/cjs/{nv-toggle.entry-5Wmww2Cd.js → nv-toggle.entry-D2TRd371.js} +3 -3
- package/dist/cjs/{nv-togglebutton.entry-Dnmfrj0O.js → nv-togglebutton.entry-D95qOQ1K.js} +2 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-C9mplQcb.js → nv-togglebuttongroup.entry-BNvyZgbh.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-CcUQrjAv.js → nv-tooltip.entry-oOw6EmyL.js} +2 -2
- package/dist/cjs/{stylefire.es-74da334a-y0piPjlz.js → style-value-types.es-f5d10b79-D0QCM8OB.js} +50 -694
- package/dist/cjs/{timeline.animation-adf35ecb-CE6Dsdxr.js → timeline.animation-79215cd4-KteJaZPb.js} +19 -0
- package/dist/generated/components.js +8 -0
- package/dist/generated/components.server.js +18 -1
- package/dist/types/generated/components.d.ts +5 -0
- package/dist/types/generated/components.server.d.ts +5 -0
- package/package.json +1 -1
- package/dist/cjs/collapse.animation-16e3af45-CChx_tQJ.js +0 -84
- package/dist/cjs/fade.animation-71e8e34c-BAw_TYsB.js +0 -68
- package/dist/cjs/nv-accordion.entry-hi3M0POV.js +0 -164
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
|
+
var constantsD0f19e7b = require('./constants-d0f19e7b-s0SCO_vi.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ const NvFieldtime = class {
|
|
|
29
29
|
// Input elements for hours, minutes, and seconds
|
|
30
30
|
this.inputElements = {};
|
|
31
31
|
this.inputZeroAdded = {};
|
|
32
|
-
this.typeFocused =
|
|
32
|
+
this.typeFocused = constantsD0f19e7b.TimeType.Hours;
|
|
33
33
|
/****************************************************************************/
|
|
34
34
|
//#region STATES
|
|
35
35
|
this.hours = '00';
|
|
@@ -142,20 +142,20 @@ const NvFieldtime = class {
|
|
|
142
142
|
else if (event.key === 'Enter' && currentIndex >= 0) {
|
|
143
143
|
event.preventDefault();
|
|
144
144
|
items[currentIndex].click();
|
|
145
|
-
if (this.typeFocused ===
|
|
146
|
-
(_a = this.inputElements[
|
|
147
|
-
(_b = this.inputElements[
|
|
145
|
+
if (this.typeFocused === constantsD0f19e7b.TimeType.Hours) {
|
|
146
|
+
(_a = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
147
|
+
(_b = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
|
|
148
148
|
}
|
|
149
|
-
else if (this.typeFocused ===
|
|
150
|
-
this.typeFocused ===
|
|
151
|
-
(_c = this.inputElements[
|
|
152
|
-
(_d = this.inputElements[
|
|
149
|
+
else if (this.typeFocused === constantsD0f19e7b.TimeType.Minutes ||
|
|
150
|
+
this.typeFocused === constantsD0f19e7b.TimeType.Seconds) {
|
|
151
|
+
(_c = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
152
|
+
(_d = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
else if (event.key === 'Escape') {
|
|
156
156
|
event.preventDefault();
|
|
157
|
-
if (this.inputElements[
|
|
158
|
-
this.inputElements[
|
|
157
|
+
if (this.inputElements[constantsD0f19e7b.TimeType.Hours]) {
|
|
158
|
+
this.inputElements[constantsD0f19e7b.TimeType.Hours].blur();
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -173,13 +173,13 @@ const NvFieldtime = class {
|
|
|
173
173
|
const inputValue = inputElement.value.replace(/[^0-9]/g, ''); // Only keep numeric input
|
|
174
174
|
// Update the time value based on the type
|
|
175
175
|
switch (type) {
|
|
176
|
-
case
|
|
176
|
+
case constantsD0f19e7b.TimeType.Hours:
|
|
177
177
|
this.handleHoursChange(inputValue, type);
|
|
178
178
|
break;
|
|
179
|
-
case
|
|
179
|
+
case constantsD0f19e7b.TimeType.Minutes:
|
|
180
180
|
this.handleMinutesChange(inputValue, type);
|
|
181
181
|
break;
|
|
182
|
-
case
|
|
182
|
+
case constantsD0f19e7b.TimeType.Seconds:
|
|
183
183
|
this.handleSecondsChange(inputValue, type);
|
|
184
184
|
break;
|
|
185
185
|
}
|
|
@@ -335,12 +335,12 @@ const NvFieldtime = class {
|
|
|
335
335
|
if (this.hours.length === 2 &&
|
|
336
336
|
!this.inputZeroAdded[type] &&
|
|
337
337
|
!reputedToZero) {
|
|
338
|
-
(_a = this.inputElements[
|
|
339
|
-
(_b = this.inputElements[
|
|
338
|
+
(_a = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
339
|
+
(_b = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
|
|
340
340
|
}
|
|
341
341
|
else if (reputedToZero) {
|
|
342
|
-
(_c = this.inputElements[
|
|
343
|
-
(_d = this.inputElements[
|
|
342
|
+
(_c = this.inputElements[constantsD0f19e7b.TimeType.Hours]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
343
|
+
(_d = this.inputElements[constantsD0f19e7b.TimeType.Hours]) === null || _d === void 0 ? void 0 : _d.select();
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
handleMinutesChange(inputValue, type) {
|
|
@@ -493,12 +493,12 @@ const NvFieldtime = class {
|
|
|
493
493
|
if (this.minutes.length === 2 &&
|
|
494
494
|
!this.inputZeroAdded[type] &&
|
|
495
495
|
!reputedToZero) {
|
|
496
|
-
(_c = this.inputElements[
|
|
497
|
-
(_d = this.inputElements[
|
|
496
|
+
(_c = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
497
|
+
(_d = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
498
498
|
}
|
|
499
499
|
else if (reputedToZero) {
|
|
500
|
-
(_e = this.inputElements[
|
|
501
|
-
(_f = this.inputElements[
|
|
500
|
+
(_e = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _e === void 0 ? void 0 : _e.focus();
|
|
501
|
+
(_f = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _f === void 0 ? void 0 : _f.select();
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
handleSecondsChange(inputValue, type) {
|
|
@@ -626,8 +626,8 @@ const NvFieldtime = class {
|
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
if (reputedToZero) {
|
|
629
|
-
(_c = this.inputElements[
|
|
630
|
-
(_d = this.inputElements[
|
|
629
|
+
(_c = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
630
|
+
(_d = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
// Parse a continuous time string (e.g., "123456") into hours, minutes, and seconds
|
|
@@ -681,26 +681,26 @@ const NvFieldtime = class {
|
|
|
681
681
|
if (this.disabled || this.readonly) {
|
|
682
682
|
return; // Do not toggle if disabled or read-only
|
|
683
683
|
}
|
|
684
|
-
if (this.open && this.inputElements[
|
|
684
|
+
if (this.open && this.inputElements[constantsD0f19e7b.TimeType.Hours]) {
|
|
685
685
|
this.open = false; // Close the popover if it is open
|
|
686
686
|
}
|
|
687
|
-
else if (this.open && this.inputElements[
|
|
687
|
+
else if (this.open && this.inputElements[constantsD0f19e7b.TimeType.Minutes]) {
|
|
688
688
|
this.open = false; // Close the popover if it is open
|
|
689
689
|
}
|
|
690
|
-
else if (this.open && this.inputElements[
|
|
690
|
+
else if (this.open && this.inputElements[constantsD0f19e7b.TimeType.Seconds]) {
|
|
691
691
|
this.open = false; // Close the popover if it is open
|
|
692
692
|
}
|
|
693
|
-
else if (!this.open && this.inputElements[
|
|
694
|
-
(_a = this.inputElements[
|
|
695
|
-
(_b = this.inputElements[
|
|
693
|
+
else if (!this.open && this.inputElements[constantsD0f19e7b.TimeType.Hours]) {
|
|
694
|
+
(_a = this.inputElements[constantsD0f19e7b.TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus(); // Focus will open the popover
|
|
695
|
+
(_b = this.inputElements[constantsD0f19e7b.TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
|
|
696
696
|
}
|
|
697
|
-
else if (!this.open && this.inputElements[
|
|
698
|
-
(_c = this.inputElements[
|
|
699
|
-
(_d = this.inputElements[
|
|
697
|
+
else if (!this.open && this.inputElements[constantsD0f19e7b.TimeType.Minutes]) {
|
|
698
|
+
(_c = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _c === void 0 ? void 0 : _c.focus(); // Focus will open the popover
|
|
699
|
+
(_d = this.inputElements[constantsD0f19e7b.TimeType.Minutes]) === null || _d === void 0 ? void 0 : _d.select();
|
|
700
700
|
}
|
|
701
|
-
else if (!this.open && this.inputElements[
|
|
702
|
-
(_e = this.inputElements[
|
|
703
|
-
(_f = this.inputElements[
|
|
701
|
+
else if (!this.open && this.inputElements[constantsD0f19e7b.TimeType.Seconds]) {
|
|
702
|
+
(_e = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _e === void 0 ? void 0 : _e.focus(); // Focus will open the popover
|
|
703
|
+
(_f = this.inputElements[constantsD0f19e7b.TimeType.Seconds]) === null || _f === void 0 ? void 0 : _f.select();
|
|
704
704
|
}
|
|
705
705
|
else {
|
|
706
706
|
console.warn('nv-fieldtime -> No input elements found to focus or to blur');
|
|
@@ -722,13 +722,13 @@ const NvFieldtime = class {
|
|
|
722
722
|
}
|
|
723
723
|
handleTimeOptionClick(event, type) {
|
|
724
724
|
const option = parseInt(event.target.textContent || '0', 10);
|
|
725
|
-
if (type ===
|
|
725
|
+
if (type === constantsD0f19e7b.TimeType.Hours) {
|
|
726
726
|
this.hours = option.toString().padStart(2, '0');
|
|
727
727
|
}
|
|
728
|
-
else if (type ===
|
|
728
|
+
else if (type === constantsD0f19e7b.TimeType.Minutes) {
|
|
729
729
|
this.minutes = option.toString().padStart(2, '0');
|
|
730
730
|
}
|
|
731
|
-
else if (type ===
|
|
731
|
+
else if (type === constantsD0f19e7b.TimeType.Seconds) {
|
|
732
732
|
this.seconds = option.toString().padStart(2, '0');
|
|
733
733
|
}
|
|
734
734
|
const reconstructTime = this.reconstructTime();
|
|
@@ -779,11 +779,11 @@ const NvFieldtime = class {
|
|
|
779
779
|
}
|
|
780
780
|
// Generate the time options based on the type
|
|
781
781
|
switch (type) {
|
|
782
|
-
case
|
|
782
|
+
case constantsD0f19e7b.TimeType.Hours:
|
|
783
783
|
return this.generateHourOptions(stepInSeconds);
|
|
784
|
-
case
|
|
784
|
+
case constantsD0f19e7b.TimeType.Minutes:
|
|
785
785
|
return this.generateMinuteOptions(stepInSeconds);
|
|
786
|
-
case
|
|
786
|
+
case constantsD0f19e7b.TimeType.Seconds:
|
|
787
787
|
return this.generateSecondOptions(stepInSeconds);
|
|
788
788
|
default:
|
|
789
789
|
return [];
|
|
@@ -885,8 +885,8 @@ const NvFieldtime = class {
|
|
|
885
885
|
}
|
|
886
886
|
if (!this.open) {
|
|
887
887
|
if (this.inputElements) {
|
|
888
|
-
(_a = this.inputElements[
|
|
889
|
-
(_b = this.inputElements[
|
|
888
|
+
(_a = this.inputElements[constantsD0f19e7b.TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
889
|
+
(_b = this.inputElements[constantsD0f19e7b.TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
|
|
890
890
|
}
|
|
891
891
|
event.preventDefault();
|
|
892
892
|
}
|
|
@@ -976,30 +976,30 @@ const NvFieldtime = class {
|
|
|
976
976
|
RenderTimeOptionsColumn(type) {
|
|
977
977
|
return (index.h("div", { class: `time-column time-column-${type}`, onScroll: e => this.handleScroll(e, type) }, this.generateInfiniteTimeOptions(type).map((option, index$1) => (index.h("div", { class: {
|
|
978
978
|
'time-option': true,
|
|
979
|
-
'selected': (type ===
|
|
980
|
-
(type ===
|
|
981
|
-
(type ===
|
|
979
|
+
'selected': (type === constantsD0f19e7b.TimeType.Hours && option === this.hours) ||
|
|
980
|
+
(type === constantsD0f19e7b.TimeType.Minutes && option === this.minutes) ||
|
|
981
|
+
(type === constantsD0f19e7b.TimeType.Seconds && option === this.seconds),
|
|
982
982
|
}, key: `${option}-${index$1}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
983
983
|
}
|
|
984
984
|
render() {
|
|
985
985
|
return (index.h(index.Host, { key: 'a960e7daf8d9a323a55b0f248dd24f8e94321161', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '23c78f159cb32ef76d0d8b5a1171246c9c69fdb7', htmlFor: this.inputId }, index.h("slot", { key: '70b2361b44414dba4ca91b487a7b04872cc0d75d', name: "label" }, this.label))), index.h("nv-popover", { key: '80de55aa7eb0c165ed6871cb0ac6a5aec9046769', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: 'fcd670c6dd32e6687540ddbdaefc2808898a459f', class: "input-wrapper", slot: "trigger" }, index.h("slot", { key: 'cea8867cee99035e97bc9ad40a7f20cf1091f415', name: "before-input" }), index.h("div", { key: 'b68a1a7477baaa3fbf39182a36fe4a693e29a688', class: "input-container" }, index.h("slot", { key: '3bb50bb3ad0207ded63bddfff6b5c5afda7ddfd4', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
986
|
-
index.h("input", { key: '236b3a8067f50c443a117e6b3e8e4b882a84eb01', ref: el => (this.inputElements[
|
|
987
|
-
? `${
|
|
988
|
-
:
|
|
986
|
+
index.h("input", { key: '236b3a8067f50c443a117e6b3e8e4b882a84eb01', ref: el => (this.inputElements[constantsD0f19e7b.TimeType.Hours] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, constantsD0f19e7b.TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(constantsD0f19e7b.TimeType.Hours), name: this.name
|
|
987
|
+
? `${constantsD0f19e7b.TimeType.Hours}-${this.name}`
|
|
988
|
+
: constantsD0f19e7b.TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
989
989
|
], this.format.includes('mm') && [
|
|
990
990
|
index.h("span", { key: '2440acab80a0d91ebe758f5a329ac5d805a18f9a' }, ":"),
|
|
991
|
-
index.h("input", { key: '72bc71a8bce65be766c899738745d85da7ef3530', ref: el => (this.inputElements[
|
|
992
|
-
? `${
|
|
993
|
-
:
|
|
991
|
+
index.h("input", { key: '72bc71a8bce65be766c899738745d85da7ef3530', ref: el => (this.inputElements[constantsD0f19e7b.TimeType.Minutes] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, constantsD0f19e7b.TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(constantsD0f19e7b.TimeType.Minutes), name: this.name
|
|
992
|
+
? `${constantsD0f19e7b.TimeType.Minutes}-${this.name}`
|
|
993
|
+
: constantsD0f19e7b.TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
994
994
|
], this.format.includes('ss') && [
|
|
995
995
|
index.h("span", { key: '0afdff59b999c346b455ed7408332d087ae48b12' }, ":"),
|
|
996
|
-
index.h("input", { key: '0ecf4b18af18b6184e0ccdd00ddea561ee403195', ref: el => (this.inputElements[
|
|
997
|
-
? `${
|
|
998
|
-
:
|
|
996
|
+
index.h("input", { key: '0ecf4b18af18b6184e0ccdd00ddea561ee403195', ref: el => (this.inputElements[constantsD0f19e7b.TimeType.Seconds] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, constantsD0f19e7b.TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(constantsD0f19e7b.TimeType.Seconds), name: this.name
|
|
997
|
+
? `${constantsD0f19e7b.TimeType.Seconds}-${this.name}`
|
|
998
|
+
: constantsD0f19e7b.TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
999
999
|
], index.h("nv-iconbutton", { key: '2d3d19d683d85110df8aab9d7c70fb377b189381', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', "aria-pressed": this.open.toString(), onClick: () => this.HandleDropdownIconClick() }), this.error && (index.h("nv-icon", { key: '8b49cb73821fea8926ede8406019fa68baa8500e', name: "alert-circle", class: "validation", size: "sm" })), this.success && (index.h("nv-icon", { key: '372b8e95455c269a988257f2504fc24c680d7f4b', name: "circle-check", class: "validation", size: "sm" }))), index.h("slot", { key: '9e23fd13862e6218cd7213729b3e165ae74fe2eb', name: "after-input" })), index.h("div", { key: 'c5b99d58c96a055ea8aeade81fb5d75490421716', class: "time-dropdown", slot: "content" }, index.h("div", { key: '2bcee9fa41574db70850445bba4d4041c9471a46', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
1000
|
-
this.RenderTimeOptionsColumn(
|
|
1001
|
-
this.RenderTimeOptionsColumn(
|
|
1002
|
-
this.RenderTimeOptionsColumn(
|
|
1000
|
+
this.RenderTimeOptionsColumn(constantsD0f19e7b.TimeType.Hours), this.format.includes('mm') &&
|
|
1001
|
+
this.RenderTimeOptionsColumn(constantsD0f19e7b.TimeType.Minutes), this.format.includes('ss') &&
|
|
1002
|
+
this.RenderTimeOptionsColumn(constantsD0f19e7b.TimeType.Seconds)))), (this.description ||
|
|
1003
1003
|
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '822534262bb1769294be95c1a240a2753d556e1c', class: "description" }, index.h("slot", { key: '62489b82bee33610b55dfa4c2f9997b5d68b6bfe', name: "description" }, this.description))), (this.errorDescription ||
|
|
1004
1004
|
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '9cedb395a09c4243c7c714574ad8d41b6a836fbb', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '7b8802739ad74756f2843dd8807afe6abda92831', name: "error-description" }, this.errorDescription)))));
|
|
1005
1005
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
|
-
var
|
|
5
|
+
var constantsD0f19e7b = require('./constants-d0f19e7b-s0SCO_vi.js');
|
|
6
6
|
require('react');
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -49,19 +49,19 @@ const NvIcon = class {
|
|
|
49
49
|
}
|
|
50
50
|
componentWillRender() {
|
|
51
51
|
if (this.xsmall) {
|
|
52
|
-
this.size =
|
|
52
|
+
this.size = constantsD0f19e7b.SemanticSizes.ExtraSmall;
|
|
53
53
|
}
|
|
54
54
|
if (this.small) {
|
|
55
|
-
this.size =
|
|
55
|
+
this.size = constantsD0f19e7b.SemanticSizes.Small;
|
|
56
56
|
}
|
|
57
57
|
if (this.medium) {
|
|
58
|
-
this.size =
|
|
58
|
+
this.size = constantsD0f19e7b.SemanticSizes.Medium;
|
|
59
59
|
}
|
|
60
60
|
if (this.large) {
|
|
61
|
-
this.size =
|
|
61
|
+
this.size = constantsD0f19e7b.SemanticSizes.Large;
|
|
62
62
|
}
|
|
63
63
|
if (this.xlarge) {
|
|
64
|
-
this.size =
|
|
64
|
+
this.size = constantsD0f19e7b.SemanticSizes.ExtraLarge;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
componentWillLoad() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
4
|
require('react');
|
|
5
5
|
|
|
6
6
|
const nvMenuCss = "nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}nv-menu{display:inline-block;position:relative}nv-menu:has([fluid]:not([fluid=false])){display:block}nv-menu nv-popover{display:unset}nv-menu nv-popover [data-scope=popover]{background-color:transparent !important;padding:0 !important}nv-menu [slot=content]{padding:var(--menu-contextual-padding-y) var(--menu-contextual-padding-x);border-radius:var(--menu-contextual-radius);gap:var(--menu-contextual-gap-y);background-color:var(--components-menu-contextual-background);border-color:var(--components-menu-contextual-border);display:flex;flex-direction:column}nv-menu nv-menu[open]:not([open=false])>nv-menuitem{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menu hr{display:block;margin:var(--menu-contextual-divider-padding-top) var(--menu-contextual-divider-padding-x) var(--menu-contextual-divider-padding-bottom) var(--menu-contextual-divider-padding-x)}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
4
|
require('react');
|
|
5
5
|
|
|
6
6
|
const nvMenuitemCss = "nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}";
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
|
+
var constantsD0f19e7b = require('./constants-d0f19e7b-s0SCO_vi.js');
|
|
5
|
+
var collapse_animationAcda1bf5 = require('./collapse.animation-acda1bf5-BuORVmQv.js');
|
|
6
|
+
var fade_animationEb454088 = require('./fade.animation-eb454088-Bma0SpTf.js');
|
|
7
|
+
var styleValueTypes_esF5d10b79 = require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
|
|
8
|
+
var timeline_animation79215cd4 = require('./timeline.animation-79215cd4-KteJaZPb.js');
|
|
9
|
+
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
10
|
+
require('react');
|
|
11
|
+
|
|
12
|
+
const useSlide = (node, { duration } = { duration: 200 }) => {
|
|
13
|
+
const nodeStyler = fade_animationEb454088.index(node);
|
|
14
|
+
/**
|
|
15
|
+
* Will animate the translateX to 100%, sliding the element to the right.
|
|
16
|
+
*/
|
|
17
|
+
function slideOut() {
|
|
18
|
+
return new Promise(resolve => {
|
|
19
|
+
styleValueTypes_esF5d10b79.animate({
|
|
20
|
+
from: { x: 0 },
|
|
21
|
+
to: { x: 100 },
|
|
22
|
+
ease: styleValueTypes_esF5d10b79.easeOut,
|
|
23
|
+
duration,
|
|
24
|
+
onUpdate(latest) {
|
|
25
|
+
nodeStyler.set({ transform: `translateX(${latest.x}%)` });
|
|
26
|
+
},
|
|
27
|
+
onComplete() {
|
|
28
|
+
resolve();
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Applies the slideOut styles without animating, useful when initial state
|
|
35
|
+
* is slid out.
|
|
36
|
+
*/
|
|
37
|
+
function setSlideOut() {
|
|
38
|
+
node.style.transform = 'translateX(100%)';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Applies the slideIn styles without animating, useful when initial state
|
|
42
|
+
* is slid in.
|
|
43
|
+
*/
|
|
44
|
+
function setSlideIn() {
|
|
45
|
+
node.style.transform = '';
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Will animate the translateX from 100% to 0%, sliding the element in from the right.
|
|
49
|
+
*/
|
|
50
|
+
function slideIn() {
|
|
51
|
+
return new Promise(resolve => {
|
|
52
|
+
styleValueTypes_esF5d10b79.animate({
|
|
53
|
+
from: { x: 100 },
|
|
54
|
+
to: { x: 0 },
|
|
55
|
+
duration,
|
|
56
|
+
onUpdate(latest) {
|
|
57
|
+
nodeStyler.set({ transform: `translateX(${latest.x}%)` });
|
|
58
|
+
},
|
|
59
|
+
onComplete() {
|
|
60
|
+
resolve();
|
|
61
|
+
node.style.removeProperty('transform');
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
slideIn,
|
|
68
|
+
slideOut,
|
|
69
|
+
setSlideOut,
|
|
70
|
+
setSlideIn,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const nvNotificationCss = "nv-notification{display:block}nv-notification [data-scope=container]{display:flex;position:relative;max-width:512px;width:100%;padding:var(--notification-padding);align-items:flex-start;gap:var(--notification-gap-x);border-radius:var(--notification-radius);border-style:solid;box-shadow:0 var(--shadow-y-axis-lg-1, 4px) var(--shadow-blur-lg-1, 6px) var(--shadow-spread-lg-1, -2px) var(--shadow-color-opacity-1, rgba(14, 14, 14, 0.06)), 0 var(--shadow-y-axis-lg-2, 10px) var(--shadow-blur-lg-2, 15px) var(--shadow-spread-lg-2, -3px) var(--shadow-color-opacity-2, rgba(14, 14, 14, 0.1))}nv-notification [data-scope=container]>nv-icon{flex-shrink:0}nv-notification [data-scope=container] [data-scope=dismiss]{padding:var(--button-sm-icon-button-padding, 8px);justify-content:center;align-items:center;gap:var(--button-sm-gap, 6px);display:flex;position:absolute;right:8px;top:8px;border-radius:var(--button-sm-border-radius, 4px);background:var(--components-button-lower-background, rgba(255, 255, 255, 0));color:var(--components-button-lower-icon)}nv-notification [data-scope=container] [data-scope=content]{display:flex;padding-right:var(--notification-padding-right);flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);flex:1 0 0}nv-notification [data-scope=container] [data-scope=content] [data-scope=heading]{display:flex;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;color:var(--components-notification-content-title);font-size:var(--notification-title-font-size);font-style:normal;font-weight:500;line-height:20px;}nv-notification [data-scope=container] [data-scope=content] [data-scope=message]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);align-self:stretch;color:var(--components-notification-content-description);font-variant-numeric:lining-nums tabular-nums slashed-zero;font-size:var(--font-size-sm, 14px);font-style:normal;font-weight:400;line-height:var(--line-height-sm, 20px)}nv-notification [data-scope=container] [data-scope=content] [data-scope=actions]{display:flex;padding:var(--spacing-2, 8px) 0;padding-bottom:0px;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;margin-left:calc(-1 * var(--button-sm-padding-x))}nv-notification[feedback=information] [data-scope=container]{background-color:var(--components-notification-information-background);border-color:var(--components-notification-information-border)}nv-notification[feedback=information] [data-scope=container]>nv-icon{color:var(--components-notification-information-icon)}nv-notification[feedback=information]>[data-scope=close]:focus,nv-notification[feedback=information]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=information]>[data-scope=close]:focus-visible,nv-notification[feedback=information]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=warning] [data-scope=container]{background-color:var(--components-notification-warning-background);border-color:var(--components-notification-warning-border)}nv-notification[feedback=warning] [data-scope=container]>nv-icon{color:var(--components-notification-warning-icon)}nv-notification[feedback=warning]>[data-scope=close]:focus,nv-notification[feedback=warning]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=warning]>[data-scope=close]:focus-visible,nv-notification[feedback=warning]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=error] [data-scope=container]{background-color:var(--components-notification-error-background);border-color:var(--components-notification-error-border)}nv-notification[feedback=error] [data-scope=container]>nv-icon{color:var(--components-notification-error-icon)}nv-notification[feedback=error]>[data-scope=close]:focus,nv-notification[feedback=error]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=error]>[data-scope=close]:focus-visible,nv-notification[feedback=error]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=success] [data-scope=container]{background-color:var(--components-notification-success-background);border-color:var(--components-notification-success-border)}nv-notification[feedback=success] [data-scope=container]>nv-icon{color:var(--components-notification-success-icon)}nv-notification[feedback=success]>[data-scope=close]:focus,nv-notification[feedback=success]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=success]>[data-scope=close]:focus-visible,nv-notification[feedback=success]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=neutral] [data-scope=container]{background-color:var(--components-notification-neutral-background);border-color:var(--components-notification-neutral-border)}nv-notification[feedback=neutral] [data-scope=container]>nv-icon{color:var(--components-notification-neutral-icon)}nv-notification[feedback=neutral]>[data-scope=close]:focus,nv-notification[feedback=neutral]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=neutral]>[data-scope=close]:focus-visible,nv-notification[feedback=neutral]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[emphasis=high] [data-scope=container]{border-width:1px;border-left-width:var(--notification-border-width-high-emphasis);padding-left:calc(var(--notification-padding) - var(--notification-border-width-high-emphasis) + 1px)}nv-notification[emphasis=medium] [data-scope=container]{border-width:var(--notification-border-width-low-emphasis);border-color:var(--color-content-low-border, #E3E3E3)}";
|
|
75
|
+
const NvNotificationStyle0 = nvNotificationCss;
|
|
76
|
+
|
|
77
|
+
const NvNotification = class {
|
|
78
|
+
constructor(hostRef) {
|
|
79
|
+
index.registerInstance(this, hostRef);
|
|
80
|
+
this.hiddenChanged = index.createEvent(this, "hiddenChanged");
|
|
81
|
+
/****************************************************************************/
|
|
82
|
+
//#region PROPERTIES
|
|
83
|
+
/**
|
|
84
|
+
* Set a unique ID for the notification. Used for aria attributes and managing
|
|
85
|
+
* multiple notifications.
|
|
86
|
+
*/
|
|
87
|
+
this.uid = v4A79185f4.v4();
|
|
88
|
+
/**
|
|
89
|
+
* Specifies the notification type which determines the color and default icon.
|
|
90
|
+
*/
|
|
91
|
+
this.feedback = 'information';
|
|
92
|
+
/**
|
|
93
|
+
* Adjusts the emphasis to make the notification more or less visually
|
|
94
|
+
* prominent to users. Use this to draw attention to important actions or
|
|
95
|
+
* reduce focus on less critical ones
|
|
96
|
+
*/
|
|
97
|
+
this.emphasis = 'medium';
|
|
98
|
+
/**
|
|
99
|
+
* Allows the notification to be dismissed via a close button (x). The
|
|
100
|
+
* notification is not dismissible unless explicitly enabled.
|
|
101
|
+
*/
|
|
102
|
+
this.dismissible = false;
|
|
103
|
+
/**
|
|
104
|
+
* Controls the visibility of the notification.
|
|
105
|
+
*/
|
|
106
|
+
this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
|
|
107
|
+
//#endregion EVENTS
|
|
108
|
+
/****************************************************************************/
|
|
109
|
+
//#region INTERNAL
|
|
110
|
+
this.iconByFeedback = {
|
|
111
|
+
[constantsD0f19e7b.FeedbackColors.Warning]: 'alert-circle',
|
|
112
|
+
[constantsD0f19e7b.FeedbackColors.Information]: 'info-circle',
|
|
113
|
+
[constantsD0f19e7b.FeedbackColors.Success]: 'circle-check',
|
|
114
|
+
[constantsD0f19e7b.FeedbackColors.Error]: 'alert-triangle',
|
|
115
|
+
[constantsD0f19e7b.FeedbackColors.Neutral]: 'help',
|
|
116
|
+
};
|
|
117
|
+
this.roleByFeedback = {
|
|
118
|
+
[constantsD0f19e7b.FeedbackColors.Error]: 'alert',
|
|
119
|
+
[constantsD0f19e7b.FeedbackColors.Warning]: 'alert',
|
|
120
|
+
[constantsD0f19e7b.FeedbackColors.Information]: 'status',
|
|
121
|
+
[constantsD0f19e7b.FeedbackColors.Success]: 'status',
|
|
122
|
+
[constantsD0f19e7b.FeedbackColors.Neutral]: 'status',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
//#endregion PROPERTIES
|
|
126
|
+
/****************************************************************************/
|
|
127
|
+
//#region METHODS
|
|
128
|
+
async dismiss() {
|
|
129
|
+
await this.dismissAnimation();
|
|
130
|
+
}
|
|
131
|
+
getDefaultIcon() {
|
|
132
|
+
var _a;
|
|
133
|
+
return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
|
|
134
|
+
}
|
|
135
|
+
getAriaRole() {
|
|
136
|
+
var _a;
|
|
137
|
+
return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
|
|
138
|
+
}
|
|
139
|
+
getAriaLive() {
|
|
140
|
+
return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
|
|
141
|
+
}
|
|
142
|
+
getHeadingId() {
|
|
143
|
+
return this.heading ? `nv-notification-${this.uid}-heading` : null;
|
|
144
|
+
}
|
|
145
|
+
getMessageId() {
|
|
146
|
+
return this.message ? `nv-notification-${this.uid}-message` : null;
|
|
147
|
+
}
|
|
148
|
+
async dismissAnimation() {
|
|
149
|
+
const { fadeOut } = fade_animationEb454088.useFade(this.container, { duration: 300 });
|
|
150
|
+
const { slideOut } = useSlide(this.container, { duration: 800 });
|
|
151
|
+
const { collapse } = collapse_animationAcda1bf5.useCollapse(this.el, {
|
|
152
|
+
duration: 800,
|
|
153
|
+
overflow: 'visible',
|
|
154
|
+
});
|
|
155
|
+
await timeline_animation79215cd4.parallel(fadeOut, slideOut, collapse).start();
|
|
156
|
+
this.hidden = true;
|
|
157
|
+
this.hiddenChanged.emit(true);
|
|
158
|
+
}
|
|
159
|
+
//#endregion INTERNAL
|
|
160
|
+
/****************************************************************************/
|
|
161
|
+
//#region LIFECYCLE
|
|
162
|
+
componentWillLoad() {
|
|
163
|
+
this.headingSlot = this.el.querySelector('[slot="heading"]');
|
|
164
|
+
this.messageSlot = this.el.querySelector('[slot="content"]');
|
|
165
|
+
this.actionsSlot = this.el.querySelector('[slot="actions"]');
|
|
166
|
+
}
|
|
167
|
+
//#endregion LIFECYCLE
|
|
168
|
+
/****************************************************************************/
|
|
169
|
+
//#region RENDER
|
|
170
|
+
render() {
|
|
171
|
+
var _a, _b, _c;
|
|
172
|
+
return (index.h(index.Host, { key: '9146cea4ed72801aadf2fb4b7e44895038c98437', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": (_a = this.getHeadingId()) !== null && _a !== void 0 ? _a : null, "aria-describedby": (_b = this.getMessageId()) !== null && _b !== void 0 ? _b : null, tabindex: "-1" }, index.h("div", { key: 'beed9ae5f6fac1b0c6d103dd75a41e0aede84041', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '8e17f33867c2563de719dc1b0f0e2d4ae39ad1a6', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'cb8850135bb2383e33a16671569547611b55e434', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'f5f58e1c3a94d854841271eb12af047322b2f0b4', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md" }), index.h("div", { key: '9c6f6bb0315cd25260d483472a24832031ce45da', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: '1013d6b6790f75682a1db0e43293b61e614f1c07', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: '844a7bccf6f365d4e59dfdec9b3c9096cbeda798', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: '6688e9dc927f6164ce60f27b84fdbeb257296504', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: 'f0c0790faa40411970575240a081f0f0bf0e9aff', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: '0ba946edf5b3a8410da3b375e589613a2674fd15', "data-scope": "actions" }, index.h("slot", { key: '0360ab92db66957f0290569c39307ced2be5922d', name: "actions" })))))));
|
|
173
|
+
}
|
|
174
|
+
get el() { return index.getElement(this); }
|
|
175
|
+
};
|
|
176
|
+
NvNotification.style = NvNotificationStyle0;
|
|
177
|
+
|
|
178
|
+
exports.nv_notification = NvNotification;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
|
+
var fade_animationEb454088 = require('./fade.animation-eb454088-Bma0SpTf.js');
|
|
5
|
+
var styleValueTypes_esF5d10b79 = require('./style-value-types.es-f5d10b79-D0QCM8OB.js');
|
|
6
6
|
var events_utilsFe1d907f = require('./events.utils-fe1d907f-01N__3wY.js');
|
|
7
7
|
require('react');
|
|
8
8
|
|
|
9
9
|
const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) => {
|
|
10
|
-
const nodeStyler =
|
|
10
|
+
const nodeStyler = fade_animationEb454088.index(node);
|
|
11
11
|
/**
|
|
12
12
|
* Will animate the scale and optionally the opacity to make the element grow and fade in,
|
|
13
13
|
* and removes the scale and opacity style attributes once complete.
|
|
14
14
|
*/
|
|
15
15
|
function growIn() {
|
|
16
16
|
return new Promise(resolve => {
|
|
17
|
-
|
|
17
|
+
styleValueTypes_esF5d10b79.animate({
|
|
18
18
|
from: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
19
19
|
to: { opacity: 1, scale: 1 },
|
|
20
20
|
duration,
|
|
@@ -63,7 +63,7 @@ const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) =>
|
|
|
63
63
|
*/
|
|
64
64
|
function growOut() {
|
|
65
65
|
return new Promise(resolve => {
|
|
66
|
-
|
|
66
|
+
styleValueTypes_esF5d10b79.animate({
|
|
67
67
|
from: { opacity: 1, scale: 1 },
|
|
68
68
|
to: { opacity: hasFade ? 0 : 1, scale: amount },
|
|
69
69
|
duration,
|
|
@@ -1902,7 +1902,7 @@ const NvPopover = class {
|
|
|
1902
1902
|
duration: isOtherMemberOpen ? 0 : 100,
|
|
1903
1903
|
amount: 0.85,
|
|
1904
1904
|
});
|
|
1905
|
-
const { fadeOut } =
|
|
1905
|
+
const { fadeOut } = fade_animationEb454088.useFade(this.popoverElement, {
|
|
1906
1906
|
duration: isOtherMemberOpen ? 0 : 100,
|
|
1907
1907
|
});
|
|
1908
1908
|
if (open === true) {
|
|
@@ -1939,7 +1939,7 @@ const NvPopover = class {
|
|
|
1939
1939
|
setGrowOut();
|
|
1940
1940
|
}
|
|
1941
1941
|
else {
|
|
1942
|
-
const { setFadeIn } =
|
|
1942
|
+
const { setFadeIn } = fade_animationEb454088.useFade(this.popoverElement);
|
|
1943
1943
|
setFadeIn();
|
|
1944
1944
|
this.popoverElement.removeAttribute('hidden');
|
|
1945
1945
|
}
|
|
@@ -1967,7 +1967,7 @@ const NvPopover = class {
|
|
|
1967
1967
|
/****************************************************************************/
|
|
1968
1968
|
//#region RENDER
|
|
1969
1969
|
render() {
|
|
1970
|
-
return (index.h(index.Host, { key: '
|
|
1970
|
+
return (index.h(index.Host, { key: 'dc7ef1862f1a1da4b32e02bee827f81545df73d1' }, index.h("slot", { key: '7535c2ba2b1f600c237602c68a04c85fd9d6d98b', name: "trigger" }), index.h("div", { key: '8e7907e2fda20d35b00642eca0507aa20e56f7cb', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: '4e081e84e9597b69351253d1c1b89c115cdcfd9a', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '5bcd80588e9746db974cee69c5963b698665d105', name: "content" }))));
|
|
1971
1971
|
}
|
|
1972
1972
|
get el() { return index.getElement(this); }
|
|
1973
1973
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
4
|
require('react');
|
|
5
5
|
|
|
6
6
|
const nvRowCss = "nv-row{display:flex;flex-wrap:wrap;margin-right:calc(var(--spacing-4) * -1);margin-left:calc(var(--spacing-4) * -1);row-gap:var(--spacing-4)}";
|
|
@@ -13,7 +13,7 @@ const NvRow = class {
|
|
|
13
13
|
/****************************************************************************/
|
|
14
14
|
//#region RENDER
|
|
15
15
|
render() {
|
|
16
|
-
return (index.h(index.Host, { key: '
|
|
16
|
+
return (index.h(index.Host, { key: '8415bdad0106bd3d836996c617a749294e0c19e2' }, index.h("slot", { key: '77c069ced0dc25c4169945877c388f30d27fdc4f' })));
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
NvRow.style = NvRowStyle0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Jgn7NELT.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
require('react');
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ const NvStack = class {
|
|
|
22
22
|
/****************************************************************************/
|
|
23
23
|
//#region RENDER
|
|
24
24
|
render() {
|
|
25
|
-
return (index.h(index.Host, { key: '
|
|
25
|
+
return (index.h(index.Host, { key: '66123f22ad4a6ebefe8663c795274eb900d2c178', class: clsx297c1ffe.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '7b3d395c3490664f0e2f337a04f69cc717ed6c0e' })));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
NvStack.style = NvStackStyle0;
|