@nova-design-system/nova-react 3.5.0 → 3.7.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 +6 -0
- package/dist/cjs/{timeline.animation-1b88f052-B8-vCVrY.js → collapse.animation-16e3af45-CChx_tQJ.js} +4 -25
- package/dist/cjs/fade.animation-71e8e34c-BAw_TYsB.js +68 -0
- package/dist/cjs/{index-Te0zRbKN.js → index-Cv7U-U85.js} +2237 -1595
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/nv-accordion-item.entry-BgDBJjHO.js +178 -0
- package/dist/cjs/nv-accordion.entry-1dHBq_qo.js +164 -0
- package/dist/cjs/{nv-alert.entry-CPbApg9_.js → nv-alert.entry-6J-BEBxl.js} +10 -8
- package/dist/cjs/{nv-avatar.entry-CwM8IOei.js → nv-avatar.entry-Lav6aVEw.js} +2 -2
- package/dist/cjs/{nv-badge_2.entry-Bqu-2k7E.js → nv-badge_2.entry-DaAOJgy_.js} +14 -12
- package/dist/cjs/{nv-breadcrumb.entry-CmceXVS9.js → nv-breadcrumb.entry-BKoLlkWC.js} +2 -2
- package/dist/cjs/{nv-breadcrumbs.entry-B7xbEUl5.js → nv-breadcrumbs.entry-BdGgzdxC.js} +2 -2
- package/dist/cjs/{nv-button.entry-Cd_CE1fx.js → nv-button.entry-Pe2qJFy0.js} +2 -2
- package/dist/cjs/{nv-calendar.entry-B2lm2nvb.js → nv-calendar.entry-WRFrbZtz.js} +97 -67
- package/dist/cjs/{nv-col.entry-BF8XR4B1.js → nv-col.entry-C3IgKfxS.js} +2 -2
- package/dist/cjs/{nv-datagrid.entry-CcQ8XP6J.js → nv-datagrid.entry-Bh1mgk8D.js} +3 -3
- package/dist/cjs/{nv-datagridcolumn.entry-uGbQ4NMr.js → nv-datagridcolumn.entry-DopvtY6C.js} +2 -2
- package/dist/cjs/{nv-dialog.entry-DyK4wFFz.js → nv-dialog.entry-D8oF5B-9.js} +20 -7
- package/dist/cjs/{nv-dialogfooter_2.entry-DT3kR9Xn.js → nv-dialogfooter_2.entry-QE1dFuOh.js} +3 -3
- package/dist/cjs/{nv-fieldcheckbox.entry-D_wHbgcq.js → nv-fieldcheckbox.entry-BbC0JUWc.js} +5 -5
- package/dist/cjs/{nv-fielddate.entry-BaIcP2EG.js → nv-fielddate.entry-BIuQgdYW.js} +122 -36
- package/dist/cjs/{nv-fielddaterange.entry-BNcF2N2M.js → nv-fielddaterange.entry-C82h1WUR.js} +33 -5
- package/dist/cjs/{nv-fielddropdown.entry-DWlDvODi.js → nv-fielddropdown.entry-CWqg8M3_.js} +4 -4
- package/dist/cjs/{nv-fielddropdownitem.entry-BIy_GUKA.js → nv-fielddropdownitem.entry-KuL1iVS4.js} +2 -2
- package/dist/cjs/{nv-fieldmultiselect.entry-B74CLRuh.js → nv-fieldmultiselect.entry-CAdWlUw2.js} +96 -103
- package/dist/cjs/{nv-fieldnumber.entry-BQBy1EIj.js → nv-fieldnumber.entry-Bbk2wO5k.js} +4 -4
- package/dist/cjs/{nv-fieldpassword.entry-DNFZvmBx.js → nv-fieldpassword.entry-BOtLqrGx.js} +4 -4
- package/dist/cjs/{nv-fieldradio.entry-BIR29jv5.js → nv-fieldradio.entry-CY4txacC.js} +4 -4
- package/dist/cjs/{nv-fieldselect.entry-DulA_N5q.js → nv-fieldselect.entry-CRP6e7uq.js} +6 -6
- package/dist/cjs/{nv-fieldslider.entry-DCslY5gg.js → nv-fieldslider.entry-BLO9yOcu.js} +54 -10
- package/dist/cjs/{nv-fieldtext.entry-Dvv8KjJC.js → nv-fieldtext.entry-BqgV8SxD.js} +4 -4
- package/dist/cjs/{nv-fieldtextarea.entry-rVcnznae.js → nv-fieldtextarea.entry-dDaXddme.js} +4 -4
- package/dist/cjs/{nv-fieldtime.entry-_fXkWsoI.js → nv-fieldtime.entry-DAIYFHO7.js} +11 -11
- package/dist/cjs/{nv-icon.entry-BGyFETNH.js → nv-icon.entry-CxE0uTUN.js} +2 -2
- package/dist/cjs/{nv-iconbutton_2.entry-CtClzxKf.js → nv-iconbutton_2.entry-DAWQjqvb.js} +3 -3
- package/dist/cjs/{nv-menu.entry-B3vFxd1E.js → nv-menu.entry-Fg1jfAeH.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-BIWwr98d.js → nv-menuitem.entry-CGg4iJrd.js} +2 -2
- package/dist/cjs/{nv-popover.entry-vonHjF_y.js → nv-popover.entry-DsKxPxfa.js} +9 -8
- package/dist/cjs/{nv-row.entry-BYUhLZ0r.js → nv-row.entry-BsPFwLLA.js} +2 -2
- package/dist/cjs/{nv-stack.entry-Cxc6QmII.js → nv-stack.entry-4Ec3nJml.js} +2 -2
- package/dist/cjs/{nv-table.entry-DSBUXcSF.js → nv-table.entry-Bv0iDqou.js} +3 -3
- package/dist/cjs/{nv-tablecolumn.entry-BP857bqD.js → nv-tablecolumn.entry-XJJCmUC2.js} +1 -1
- package/dist/cjs/{nv-toggle.entry-CnquGUlJ.js → nv-toggle.entry-C72c_569.js} +3 -3
- package/dist/cjs/{nv-tooltip.entry-XvxL_FTH.js → nv-tooltip.entry-BNvm30iV.js} +4 -3
- package/dist/cjs/{fade.animation-2a077983-aKN0EDTo.js → stylefire.es-74da334a-y0piPjlz.js} +0 -64
- package/dist/cjs/timeline.animation-adf35ecb-CE6Dsdxr.js +23 -0
- package/dist/generated/components.js +18 -2
- package/dist/generated/components.server.js +23 -3
- package/dist/types/generated/components.d.ts +17 -3
- package/dist/types/generated/components.server.d.ts +17 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Cv7U-U85.js');
|
|
4
4
|
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
5
5
|
var _commonjsHelpers1789f0cf = require('./_commonjsHelpers-1789f0cf-BJu3ubxk.js');
|
|
6
6
|
require('react');
|
|
@@ -235,26 +235,6 @@ function parseDate(dateInput, dateFormat) {
|
|
|
235
235
|
parsed = dayjs(dateInput, dateFormat, true);
|
|
236
236
|
}
|
|
237
237
|
if (!parsed.isValid()) {
|
|
238
|
-
// Check if the date input contains placeholder characters (incomplete input from Inputmask)
|
|
239
|
-
// This specifically targets partial dates being typed with placeholder characters
|
|
240
|
-
const hasPlaceholderChars = typeof dateInput === 'string' &&
|
|
241
|
-
(dateInput.includes('_') ||
|
|
242
|
-
dateInput.includes('-_') ||
|
|
243
|
-
dateInput.includes('/_') ||
|
|
244
|
-
dateInput.includes('._'));
|
|
245
|
-
// Check if it looks like a partial date being typed (starts with valid pattern)
|
|
246
|
-
const looksLikePartialDate = typeof dateInput === 'string' &&
|
|
247
|
-
dateInput.length < dateFormat.length &&
|
|
248
|
-
/^[\d\-/.]*$/.test(dateInput) && // Only contains digits and date separators
|
|
249
|
-
dateInput.length > 0;
|
|
250
|
-
const isIncompleteInput = hasPlaceholderChars || looksLikePartialDate;
|
|
251
|
-
// Only log error if it's not an incomplete input (to avoid spam during typing)
|
|
252
|
-
if (!isIncompleteInput) {
|
|
253
|
-
console.error(`Parsing error:`, {
|
|
254
|
-
dateInput,
|
|
255
|
-
dateFormat: dateFormat,
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
238
|
return null;
|
|
259
239
|
}
|
|
260
240
|
return parsed.toDate();
|
|
@@ -416,9 +396,13 @@ const CalendarGrid = props => {
|
|
|
416
396
|
return (index.h("div", { class: "days-container" },
|
|
417
397
|
index.h("div", { class: "days-header" }, dayNames.map((day, index$1) => (index.h("div", { class: "day-header", key: `day-header-${index$1}` }, day)))),
|
|
418
398
|
index.h("div", { class: "days-grid" }, days.map(day => {
|
|
399
|
+
if (day.isBlank) {
|
|
400
|
+
return index.h("div", { class: "day day-blank" });
|
|
401
|
+
}
|
|
419
402
|
const date = day.date;
|
|
420
|
-
if (!date)
|
|
421
|
-
return
|
|
403
|
+
if (!date || !day.dayOfMonth) {
|
|
404
|
+
return index.h("div", { class: "day-cell is-disabled is-empty" });
|
|
405
|
+
}
|
|
422
406
|
const isSelected = selectionType === 'single' &&
|
|
423
407
|
isSameDate(date, selectedDate, { isUTCMode });
|
|
424
408
|
const isInRange = isDateInRange(date);
|
|
@@ -429,7 +413,7 @@ const CalendarGrid = props => {
|
|
|
429
413
|
}))));
|
|
430
414
|
};
|
|
431
415
|
|
|
432
|
-
const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
|
|
416
|
+
const nvCalendarCss = "nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--components-calendar-background);border-radius:var(--calendar-radius);padding:var(--calendar-padding);box-shadow:0px var(--shadow-y-axis-md-1) var(--shadow-blur-md-1) var(--shadow-spread-md, 0) var(--shadow-color-opacity-0), 0px var(--shadow-y-axis-md-2) var(--shadow-blur-md-2) var(--shadow-spread-md, 0) var(--shadow-color-opacity-2);border:1px solid var(--components-calendar-border);width:auto;max-width:100%}.datepicker-container-single{max-width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){max-width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:var(--calendar-gap-x);width:auto;overflow-x:hidden}.datepicker-wrapper::-webkit-scrollbar{width:6px;height:6px}.datepicker-wrapper::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}.datepicker-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:var(--calendar-padding);width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-calendar-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:start;align-items:center;margin-bottom:var(--calendar-header-margin-bottom);width:100%}.header nv-iconbutton{width:var(--calendar-header-button-size);height:var(--calendar-header-button-size)}.nav-buttons{display:flex;gap:var(--spacing-0);margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:var(--spacing-1);align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:start;flex-grow:1}.date-controls .month-select,.date-controls .year-input{background:transparent !important}.calendar-wrapper:nth-child(n+2) .datepicker-container{margin-left:42px}.calendar-grid{display:grid;grid-template-columns:auto 1fr;column-gap:var(--calendar-weeks-calendar-gap-x);position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:var(--calendar-cell-size) repeat(6, var(--calendar-cell-size));background:var(--components-calendar-weeks-background);color:var(--components-calendar-weeks-text);border-radius:var(--calendar-weeks-radius);width:var(--calendar-weeks-size);row-gap:var(--calendar-grid-gap-y)}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background-color:var(--components-calendar-weeks-background-hover);color:var(--components-calendar-weeks-text-hover);border-radius:var(--calendar-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:var(--calendar-cell-font-size)}.week-header{font-weight:700;color:var(--components-calendar-weeks-text)}.week-number{color:var(--components-calendar-cell-text)}.days-container{display:grid;grid-template-rows:auto 1fr;row-gap:var(--calendar-grid-gap-y)}.days-header{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));height:var(--calendar-cell-size)}.day-header{display:grid;place-items:center;font-size:var(--calendar-cell-font-size);color:var(--components-calendar-cell-text)}.days-grid{display:grid;grid-template-columns:repeat(7, var(--calendar-cell-size));grid-template-rows:repeat(6, var(--calendar-cell-size));animation:fadeIn 0.2s ease-in;row-gap:var(--calendar-grid-gap-y);z-index:0}.day{display:grid;place-items:center;width:var(--calendar-cell-size);height:var(--calendar-cell-size);font-size:var(--calendar-cell-font-size);border-radius:var(--calendar-cell-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}.day.selected,.day.selected:hover .day.is-today.selected,.day.is-today.selected:hover{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected) !important}.day.disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.day.is-empty{pointer-events:none;background-color:transparent;border-color:transparent}.day.day-blank{pointer-events:none;background-color:transparent;border-color:transparent}.day.outside-month{color:var(--components-calendar-cell-text);opacity:var(--opacity-disabled)}.day.outside-month.selected{opacity:1 !important;color:var(--components-calendar-cell-text-selected)}.day.outside-month.in-range{opacity:0.5 !important;background-color:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range)}.day.outside-month.in-range:hover{opacity:0.7 !important;background-color:var(--components-calendar-cell-background-in-range)}.day.in-range{background:var(--components-calendar-cell-background-in-range);color:var(--components-calendar-cell-text-in-range);border-radius:0;position:relative}.day.range-start,.day.range-start:focus,.day.range-start:hover,.day.range-end,.day.range-end:focus,.day.range-end:hover{background-color:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected) !important}.day.range-start,.day.range-end,.day.range-start.is-today,.day.range-end.is-today{background:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected);position:relative;border-radius:var(--radius-rounded-full)}.day.range-start:hover,.day.range-end:hover,.day.range-start.is-today:hover,.day.range-end.is-today:hover{color:var(--components-calendar-cell-text-today)}.day.range-start:before,.day.range-end:before,.day.range-start.is-today:before,.day.range-end.is-today:before{content:\"\";position:absolute;bottom:0;left:0;right:0;top:0;z-index:-1;background-color:var(--components-calendar-cell-background-in-range);border-radius:var(--radius-rounded-full);width:auto;height:auto}.day.range-start:has(~.range-end):before,.day.range-start:has(+.in-range):before{border-top-right-radius:0;border-bottom-right-radius:0}.day.range-end:before{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.day.outside-month.range-start,.day.outside-month.range-end{opacity:1 !important;background:var(--components-calendar-cell-background-selected) !important;color:var(--components-calendar-cell-text-selected)}.day.is-today{font-weight:700;position:relative;color:var(--components-calendar-cell-text-today)}.day.is-today.range-start,.day.is-today.range-end{color:var(--components-calendar-cell-text-selected)}.day.is-today.range-start:hover,.day.is-today.range-end:hover{color:var(--components-calendar-cell-text-today)}.day.is-today::after{content:\"\";position:absolute;bottom:var(--spacing-1);left:50%;transform:translateX(-50%);width:var(--calendar-cell-dot-size);height:var(--calendar-cell-dot-size);background-color:currentColor;border-radius:50%}.day.is-today.selected::after{color:var(--components-calendar-cell-text-selected)}.day.is-today.selected::after::after{background-color:var(--components-calendar-cell-dot-selected)}.calendar-footer{display:flex;gap:var(--spacing-1);justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-calendar-border);padding:var(--calendar-controls-padding-top) var(--calendar-padding) var(--calendar-padding);gap:var(--calendar-grid-gap-y);margin-top:var(--calendar-controls-margin-top)}.datepicker-actions{display:flex;justify-content:flex-end;gap:var(--spacing-1);width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:var(--spacing-1);margin-top:var(--spacing-4)}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}";
|
|
433
417
|
const NvCalendarStyle0 = nvCalendarCss;
|
|
434
418
|
|
|
435
419
|
const NvCalendar = class {
|
|
@@ -487,6 +471,8 @@ const NvCalendar = class {
|
|
|
487
471
|
this.showActions = false;
|
|
488
472
|
/** Cache for parsed disabled dates */
|
|
489
473
|
this.parsedDisabledDates = [];
|
|
474
|
+
/** Flag to indicate a user click for selection */
|
|
475
|
+
this.isUserClick = false;
|
|
490
476
|
//#endregion PROPERTIES
|
|
491
477
|
/****************************************************************************/
|
|
492
478
|
//#region STATE
|
|
@@ -522,7 +508,7 @@ const NvCalendar = class {
|
|
|
522
508
|
}
|
|
523
509
|
// Navigate to the date if not prevented
|
|
524
510
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
525
|
-
if (!preventNavigation) {
|
|
511
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
526
512
|
this.currentDate = parsedDate;
|
|
527
513
|
}
|
|
528
514
|
}
|
|
@@ -550,7 +536,7 @@ const NvCalendar = class {
|
|
|
550
536
|
}
|
|
551
537
|
// Navigate to start date if not prevented
|
|
552
538
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
553
|
-
if (!preventNavigation) {
|
|
539
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
554
540
|
this.currentDate = startDate;
|
|
555
541
|
}
|
|
556
542
|
}
|
|
@@ -571,20 +557,14 @@ const NvCalendar = class {
|
|
|
571
557
|
*/
|
|
572
558
|
this.changeMonth = (offset) => {
|
|
573
559
|
const newDate = new Date(this.currentDate);
|
|
574
|
-
//
|
|
560
|
+
newDate.setUTCDate(1); // Set to the first of the month to avoid day-of-month issues
|
|
575
561
|
newDate.setUTCMonth(newDate.getUTCMonth() + offset);
|
|
576
|
-
// Add the appropriate animation class
|
|
577
562
|
const containers = this.el.querySelectorAll('.calendar-grid');
|
|
578
563
|
containers.forEach(container => {
|
|
579
|
-
// Remove existing animation classes
|
|
580
564
|
container.classList.remove('slide-left', 'slide-right');
|
|
581
|
-
// Add the new animation class
|
|
582
565
|
const animationClass = offset > 0 ? 'slide-left' : 'slide-right';
|
|
583
566
|
container.classList.add(animationClass);
|
|
584
|
-
|
|
585
|
-
setTimeout(() => {
|
|
586
|
-
container.classList.remove(animationClass);
|
|
587
|
-
}, 300); // 300ms corresponds to $slide-duration in the SCSS
|
|
567
|
+
setTimeout(() => container.classList.remove(animationClass), 300);
|
|
588
568
|
});
|
|
589
569
|
this.currentDate = newDate;
|
|
590
570
|
};
|
|
@@ -596,12 +576,16 @@ const NvCalendar = class {
|
|
|
596
576
|
if (this.isDateDisabled(date)) {
|
|
597
577
|
return;
|
|
598
578
|
}
|
|
579
|
+
this.isUserClick = true;
|
|
599
580
|
if (this.selectionType === 'single') {
|
|
600
581
|
this.handleSingleSelection(date);
|
|
601
582
|
}
|
|
602
583
|
else {
|
|
603
584
|
this.handleRangeSelection(date);
|
|
604
585
|
}
|
|
586
|
+
requestAnimationFrame(() => {
|
|
587
|
+
this.isUserClick = false;
|
|
588
|
+
});
|
|
605
589
|
};
|
|
606
590
|
/**
|
|
607
591
|
* Handles single date selection
|
|
@@ -744,12 +728,15 @@ const NvCalendar = class {
|
|
|
744
728
|
/**
|
|
745
729
|
* Generates the days of the current month
|
|
746
730
|
* @param {number} offset - Month offset (0 by default)
|
|
747
|
-
* @param {number} totalCalendars - Number of calendars to display (1 by default)
|
|
748
731
|
* @returns {Array<{ dayOfMonth: number | null, date: Date | null, isSelected: boolean, isDisabled: boolean }>} Array of formatted days
|
|
749
732
|
*/
|
|
750
|
-
this.getDaysInMonth = (offset = 0
|
|
751
|
-
const
|
|
752
|
-
|
|
733
|
+
this.getDaysInMonth = (offset = 0) => {
|
|
734
|
+
const baseMonth = this.currentDate.getUTCMonth();
|
|
735
|
+
// Correctly calculate the year and month for the given offset
|
|
736
|
+
const targetDate = new Date(this.currentDate);
|
|
737
|
+
targetDate.setUTCMonth(baseMonth + offset);
|
|
738
|
+
const year = targetDate.getUTCFullYear();
|
|
739
|
+
const month = targetDate.getUTCMonth();
|
|
753
740
|
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
754
741
|
const lastDay = new Date(Date.UTC(year, month + 1, 0));
|
|
755
742
|
const days = [];
|
|
@@ -758,18 +745,18 @@ const NvCalendar = class {
|
|
|
758
745
|
const dayOfWeekIndex = firstDay.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
|
759
746
|
// Adjust based on firstDayOfWeek (if week starts on Monday, offset is different)
|
|
760
747
|
const offsetDays = (dayOfWeekIndex - this.firstDayOfWeek + 7) % 7;
|
|
761
|
-
// Add
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
}
|
|
748
|
+
// Add padding days from the previous month
|
|
749
|
+
for (let i = 0; i < offsetDays; i++) {
|
|
750
|
+
const prevMonthDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
751
|
+
const date = new Date(Date.UTC(year, month - 1, prevMonthDay - offsetDays + 1 + i));
|
|
752
|
+
days.push({
|
|
753
|
+
dayOfMonth: date.getUTCDate(),
|
|
754
|
+
date,
|
|
755
|
+
isCurrentMonth: false,
|
|
756
|
+
isDisabled: this.isDateDisabled(date),
|
|
757
|
+
// Days from previous month are blank if not the first calendar
|
|
758
|
+
isBlank: offset > 0,
|
|
759
|
+
});
|
|
773
760
|
}
|
|
774
761
|
// Add the days of the current month
|
|
775
762
|
for (let i = 1; i <= lastDay.getUTCDate(); i++) {
|
|
@@ -779,11 +766,12 @@ const NvCalendar = class {
|
|
|
779
766
|
date,
|
|
780
767
|
isCurrentMonth: true,
|
|
781
768
|
isDisabled: this.isDateDisabled(date),
|
|
769
|
+
isBlank: false,
|
|
782
770
|
});
|
|
783
771
|
}
|
|
784
|
-
// Add
|
|
785
|
-
|
|
786
|
-
|
|
772
|
+
// Add padding days to fill the last week
|
|
773
|
+
const nextMonthDaysNeeded = 7 - (days.length % 7 || 7);
|
|
774
|
+
if (nextMonthDaysNeeded < 7) {
|
|
787
775
|
for (let i = 1; i <= nextMonthDaysNeeded; i++) {
|
|
788
776
|
const date = new Date(Date.UTC(year, month + 1, i));
|
|
789
777
|
days.push({
|
|
@@ -791,6 +779,8 @@ const NvCalendar = class {
|
|
|
791
779
|
date,
|
|
792
780
|
isCurrentMonth: false,
|
|
793
781
|
isDisabled: this.isDateDisabled(date),
|
|
782
|
+
// Days from next month are blank if not the last calendar
|
|
783
|
+
isBlank: offset < this.numberOfCalendars - 1,
|
|
794
784
|
});
|
|
795
785
|
}
|
|
796
786
|
}
|
|
@@ -828,12 +818,25 @@ const NvCalendar = class {
|
|
|
828
818
|
this.handleMonthChange = (event, calendarOffset = 0) => {
|
|
829
819
|
const select = event.target;
|
|
830
820
|
const selectedMonth = parseInt(select.value, 10);
|
|
831
|
-
const currentMonth = this.currentDate.getUTCMonth();
|
|
832
|
-
// Calculate the difference considering the calendar offset
|
|
833
|
-
const monthDiff = selectedMonth - ((currentMonth + calendarOffset) % 12);
|
|
834
821
|
const newDate = new Date(this.currentDate);
|
|
835
|
-
|
|
836
|
-
|
|
822
|
+
// Date for the calendar being changed
|
|
823
|
+
const targetCalendarDate = new Date(newDate.toUTCString());
|
|
824
|
+
targetCalendarDate.setUTCMonth(targetCalendarDate.getUTCMonth() + calendarOffset);
|
|
825
|
+
const currentMonth = targetCalendarDate.getUTCMonth();
|
|
826
|
+
let monthDiff = selectedMonth - currentMonth;
|
|
827
|
+
// Smartly adjust for year change
|
|
828
|
+
if (monthDiff > 6) {
|
|
829
|
+
// e.g. from Jan to Dec, go back 1 month
|
|
830
|
+
monthDiff -= 12;
|
|
831
|
+
}
|
|
832
|
+
if (monthDiff < -6) {
|
|
833
|
+
// e.g. from Dec to Jan, go forward 1 month
|
|
834
|
+
monthDiff += 12;
|
|
835
|
+
}
|
|
836
|
+
// Apply the diff to the original `currentDate`
|
|
837
|
+
const finalDate = new Date(this.currentDate);
|
|
838
|
+
finalDate.setUTCMonth(finalDate.getUTCMonth() + monthDiff);
|
|
839
|
+
this.currentDate = finalDate;
|
|
837
840
|
};
|
|
838
841
|
/**
|
|
839
842
|
* Handles year change in the numeric entry
|
|
@@ -845,9 +848,10 @@ const NvCalendar = class {
|
|
|
845
848
|
const year = parseInt(input.value, 10);
|
|
846
849
|
if (!isNaN(year) && year >= 1900 && year <= 2100) {
|
|
847
850
|
const newDate = new Date(this.currentDate);
|
|
848
|
-
newDate.setUTCFullYear(year);
|
|
849
851
|
newDate.setUTCMonth(newDate.getUTCMonth() + calendarOffset);
|
|
850
|
-
|
|
852
|
+
newDate.setUTCFullYear(year);
|
|
853
|
+
newDate.setUTCMonth(newDate.getUTCMonth() - calendarOffset);
|
|
854
|
+
this.currentDate = new Date(newDate);
|
|
851
855
|
}
|
|
852
856
|
};
|
|
853
857
|
/**
|
|
@@ -858,7 +862,7 @@ const NvCalendar = class {
|
|
|
858
862
|
this.handleWeekSelection = (weekDays, calendarIndex) => {
|
|
859
863
|
if (this.selectionType !== 'range')
|
|
860
864
|
return;
|
|
861
|
-
const allDays = this.getDaysInMonth(calendarIndex
|
|
865
|
+
const allDays = this.getDaysInMonth(calendarIndex);
|
|
862
866
|
const weekStart = weekDays[0];
|
|
863
867
|
const weekEnd = weekDays[weekDays.length - 1];
|
|
864
868
|
if (!weekStart || !weekEnd)
|
|
@@ -1071,12 +1075,17 @@ const NvCalendar = class {
|
|
|
1071
1075
|
index$1,
|
|
1072
1076
|
/** Month offset */
|
|
1073
1077
|
offset) => {
|
|
1074
|
-
const days = this.getDaysInMonth(offset
|
|
1078
|
+
const days = this.getDaysInMonth(offset);
|
|
1075
1079
|
const weeks = [];
|
|
1076
1080
|
for (let i = 0; i < days.length; i += 7) {
|
|
1077
1081
|
weeks.push(days.slice(i, i + 7));
|
|
1078
1082
|
}
|
|
1079
|
-
|
|
1083
|
+
// Add year and month to the key to force re-render on date change
|
|
1084
|
+
const targetDate = new Date(this.currentDate);
|
|
1085
|
+
targetDate.setUTCMonth(targetDate.getUTCMonth() + offset);
|
|
1086
|
+
const year = targetDate.getUTCFullYear();
|
|
1087
|
+
const month = targetDate.getUTCMonth();
|
|
1088
|
+
return (index.h("div", { class: "calendar-wrapper" }, index.h("div", { class: "calendar-container", key: `calendar-${index$1}-${year}-${month}` }, this.renderHeader(offset, index$1), index.h("div", { class: "calendar-grid" }, this.showWeekNumbers && this.renderWeekNumbers(weeks, index$1), index.h(CalendarGrid, { days: days, dayNames: this.getDayNames(), selectionType: this.selectionType, selectedDate: this.selectedDate, startDate: this.startDate, endDate: this.endDate, isUTCMode: this.isUTCMode, onDayClick: this.handleDateSelection, isDateInRange: this.isDateInRange, isToday: this.isToday }))), index$1 < this.numberOfCalendars - 1 && (index.h("div", { class: "calendar-separator" }))));
|
|
1080
1089
|
};
|
|
1081
1090
|
/**
|
|
1082
1091
|
* Renders the shortcuts
|
|
@@ -1126,7 +1135,7 @@ const NvCalendar = class {
|
|
|
1126
1135
|
this.endDate = endDate;
|
|
1127
1136
|
// Do not navigate to the start date if data-prevent-navigation attribute is present
|
|
1128
1137
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
1129
|
-
if (!preventNavigation) {
|
|
1138
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
1130
1139
|
this.currentDate = startDate;
|
|
1131
1140
|
}
|
|
1132
1141
|
}
|
|
@@ -1154,7 +1163,7 @@ const NvCalendar = class {
|
|
|
1154
1163
|
this.selectedDate = parsedDate;
|
|
1155
1164
|
// Do not navigate to the selected date if data-prevent-navigation attribute is present
|
|
1156
1165
|
const preventNavigation = this.el.getAttribute('data-prevent-navigation') === 'true';
|
|
1157
|
-
if (!preventNavigation) {
|
|
1166
|
+
if (!preventNavigation && !this.isUserClick) {
|
|
1158
1167
|
this.currentDate = parsedDate;
|
|
1159
1168
|
}
|
|
1160
1169
|
}
|
|
@@ -1268,6 +1277,27 @@ const NvCalendar = class {
|
|
|
1268
1277
|
throw error; // Re-throw to let the caller handle it
|
|
1269
1278
|
}
|
|
1270
1279
|
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Clears the current selection and resets the calendar to its initial state.
|
|
1282
|
+
* This method can be called programmatically to reset the calendar.
|
|
1283
|
+
*/
|
|
1284
|
+
async clear() {
|
|
1285
|
+
if (this.selectionType === 'single') {
|
|
1286
|
+
this.selectedDate = null;
|
|
1287
|
+
this.singleValue = '';
|
|
1288
|
+
this.value = '';
|
|
1289
|
+
this.singleDateChange.emit('');
|
|
1290
|
+
this.valueChanged.emit('');
|
|
1291
|
+
}
|
|
1292
|
+
else {
|
|
1293
|
+
this.startDate = null;
|
|
1294
|
+
this.endDate = null;
|
|
1295
|
+
this.rangeValue = { start: '', end: '' };
|
|
1296
|
+
this.value = '';
|
|
1297
|
+
this.rangeDateChange.emit({ start: '', end: '' });
|
|
1298
|
+
this.valueChanged.emit('');
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1271
1301
|
/**
|
|
1272
1302
|
* Renders the datepicker
|
|
1273
1303
|
* @returns {JSX.Element} Datepicker
|
|
@@ -1275,8 +1305,8 @@ const NvCalendar = class {
|
|
|
1275
1305
|
* @slot default - Child content of the component.
|
|
1276
1306
|
*/
|
|
1277
1307
|
render() {
|
|
1278
|
-
return (index.h(index.Host, { key: '
|
|
1279
|
-
this.hasActions) && (index.h("div", { key: '
|
|
1308
|
+
return (index.h(index.Host, { key: '7abeb96312f2bcf26eed3a133ef59d5d3b5b528f' }, index.h("div", { key: 'e0b2db720853551e3b6445e92b39b418123cb83e', class: "datepicker-root" }, index.h("div", { key: '1a83c285278c440c4e33ae770a033974e4924830', class: `datepicker-container ${this.numberOfCalendars === 1 ? 'datepicker-container-single' : ''}` }, index.h("div", { key: '3481fe780a3e1d8f0c1e22ffc82c3b7830721055', class: `datepicker-wrapper ${this.numberOfCalendars === 1 ? 'single' : ''}` }, this.shortcutsPlacement === 'left' && this.renderShortcuts(), Array.from({ length: this.numberOfCalendars }, (_, index) => this.renderCalendar(index, index)), this.shortcutsPlacement === 'right' && this.renderShortcuts()), ((this.hasShortcuts && this.shortcutsPlacement === 'bottom') ||
|
|
1309
|
+
this.hasActions) && (index.h("div", { key: '3a644bdc993142c181c45173756e362025d4a23a', class: "datepicker-controls" }, this.shortcutsPlacement === 'bottom' && this.renderShortcuts(), this.hasActions && this.renderActions())))), index.h("slot", { key: '4a4290ccf63429a9a88cfd95a33b4fdc34c8ef74' })));
|
|
1280
1310
|
}
|
|
1281
1311
|
get el() { return index.getElement(this); }
|
|
1282
1312
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Cv7U-U85.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
require('react');
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ const NvCol = class {
|
|
|
29
29
|
/****************************************************************************/
|
|
30
30
|
//#region RENDER
|
|
31
31
|
render() {
|
|
32
|
-
return (index.h(index.Host, { key: '
|
|
32
|
+
return (index.h(index.Host, { key: 'e258bc3e01d3bd35bf64f14241c70ae044fac132', class: clsx297c1ffe.clsx(this.getColSize()) }, index.h("slot", { key: 'd36caf0fde38eae6cd37b62fb4c02e3de6b7225e' })));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
NvCol.style = NvColStyle0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Cv7U-U85.js');
|
|
4
4
|
var dom_utilsAc71e0ef = require('./dom.utils-ac71e0ef-CmIwRr6O.js');
|
|
5
5
|
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
6
6
|
require('react');
|
|
@@ -4321,7 +4321,7 @@ const NvDatagrid = class {
|
|
|
4321
4321
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
4322
4322
|
? []
|
|
4323
4323
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
4324
|
-
return (index.h(index.Host, { key: '
|
|
4324
|
+
return (index.h(index.Host, { key: 'b149279b85a3138e5be62b2f431a82fe5056b996' }, index.h("div", { key: '84ffd6a613a7e51539f0bc7e5ddff16a1769af5a', class: "hidden" }, index.h("slot", { key: 'cabafd2aab117816742972bd4eb6e7122c333ee9' })), index.h("slot", { key: '17a26ba154ddc2dea82f7576878107ede55a2043', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: '822bb793cad6266810571dbb2c087c9e2b68958d', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: 'b9fd668a09b602ded195e4d10b79ae3d06c9a0f6', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("div", null, index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
|
|
4325
4325
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
4326
4326
|
return this.getHeaderCell(header);
|
|
4327
4327
|
}))))
|
|
@@ -4332,7 +4332,7 @@ const NvDatagrid = class {
|
|
|
4332
4332
|
return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
4333
4333
|
})));
|
|
4334
4334
|
}))), this.table && this.enableRowSelection ? (index.h("tfoot", null, index.h("tr", null, index.h("td", { colSpan: 20 }, this.enableRowSelection && this.table ? (index.h("div", null, this.rowSelectionState &&
|
|
4335
|
-
Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: '
|
|
4335
|
+
Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: 'f509745423857527f2983c5cce1289441cc1f7c7', name: "after" })));
|
|
4336
4336
|
}
|
|
4337
4337
|
get el() { return index.getElement(this); }
|
|
4338
4338
|
static get watchers() { return {
|
package/dist/cjs/{nv-datagridcolumn.entry-uGbQ4NMr.js → nv-datagridcolumn.entry-DopvtY6C.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Cv7U-U85.js');
|
|
4
4
|
require('react');
|
|
5
5
|
|
|
6
6
|
const NvDatagridcolumn = class {
|
|
@@ -15,7 +15,7 @@ const NvDatagridcolumn = class {
|
|
|
15
15
|
/****************************************************************************/
|
|
16
16
|
//#region RENDER
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h(index.Host, { key: '
|
|
18
|
+
return (index.h(index.Host, { key: '49c4b8807b26a76cf26e9ac9567a5bca7de0aee7' }, index.h("slot", { key: '9e6c8b69a92fe4caec10025c941e39f1266b4f93', name: "header" }), index.h("slot", { key: '992fa9c1d00fe8ed65df5ad2157b78140d2794a0', name: "cell" })));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Cv7U-U85.js');
|
|
4
4
|
var events_utilsFe1d907f = require('./events.utils-fe1d907f-01N__3wY.js');
|
|
5
5
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
6
6
|
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
@@ -541,7 +541,7 @@ var tabbable = function tabbable(container, options) {
|
|
|
541
541
|
return sortByOrder(candidates);
|
|
542
542
|
};
|
|
543
543
|
|
|
544
|
-
const nvDialogCss = "dialog{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:400px;width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;max-height:90vh;overflow:hidden;box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}dialog.full{width:90vw}dialog::backdrop{opacity:var(--components-overlay-opacity);background:var(--components-overlay-background)}dialog .content{display:flex;flex-direction:column;align-items:flex-start;height:fit-content;max-height:90vh;overflow:hidden}dialog .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}dialog .content .content-body{overflow:auto;box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:400;line-height:var(--line-height-base);color:var(--color-content-medium-text)}dialog .content .content-body::-webkit-scrollbar{width:6px;height:6px}dialog .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}dialog .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}";
|
|
544
|
+
const nvDialogCss = "dialog{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 400px);width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;max-height:90vh;overflow:hidden;box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}dialog.full{width:90vw}dialog::backdrop{opacity:var(--components-overlay-opacity);background:var(--components-overlay-background)}dialog .content{display:flex;flex-direction:column;align-items:flex-start;height:fit-content;max-height:90vh;overflow:hidden}dialog .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}dialog .content .content-body{overflow:auto;box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:400;line-height:var(--line-height-base);color:var(--color-content-medium-text)}dialog .content .content-body::-webkit-scrollbar{width:6px;height:6px}dialog .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}dialog .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}";
|
|
545
545
|
const NvDialogStyle0 = nvDialogCss;
|
|
546
546
|
|
|
547
547
|
const NvDialog = class {
|
|
@@ -570,6 +570,11 @@ const NvDialog = class {
|
|
|
570
570
|
* If true, the dialog takes full width styling.
|
|
571
571
|
*/
|
|
572
572
|
this.full = false;
|
|
573
|
+
/**
|
|
574
|
+
* Controls whether the dialog should automatically focus the first focusable element when opened.
|
|
575
|
+
* When disabled, prevents unwanted tooltip triggers on dialog open.
|
|
576
|
+
*/
|
|
577
|
+
this.autofocus = false;
|
|
573
578
|
/**
|
|
574
579
|
* Handles the close button click.
|
|
575
580
|
*/
|
|
@@ -677,15 +682,23 @@ const NvDialog = class {
|
|
|
677
682
|
}
|
|
678
683
|
/**
|
|
679
684
|
* Prevents the body from scrolling when the dialog is open.
|
|
685
|
+
* Compensates for scrollbar width to prevent layout shift.
|
|
680
686
|
*/
|
|
681
687
|
preventScroll() {
|
|
682
|
-
|
|
688
|
+
// Calculate scrollbar width
|
|
689
|
+
const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
690
|
+
// Apply overflow hidden and padding compensation
|
|
691
|
+
document.documentElement.style.overflow = 'hidden';
|
|
692
|
+
document.documentElement.style.paddingRight = `${scrollBarWidth}px`;
|
|
683
693
|
}
|
|
684
694
|
/**
|
|
685
695
|
* Allows the body to scroll when the dialog is closed.
|
|
696
|
+
* Removes the applied overflow and padding styles.
|
|
686
697
|
*/
|
|
687
698
|
allowScroll() {
|
|
688
|
-
|
|
699
|
+
// Remove the applied styles
|
|
700
|
+
document.documentElement.style.removeProperty('overflow');
|
|
701
|
+
document.documentElement.style.removeProperty('padding-right');
|
|
689
702
|
}
|
|
690
703
|
ensureFormId(formElement) {
|
|
691
704
|
if (!formElement.id) {
|
|
@@ -762,8 +775,8 @@ const NvDialog = class {
|
|
|
762
775
|
if (this.open) {
|
|
763
776
|
this.show();
|
|
764
777
|
}
|
|
765
|
-
//
|
|
766
|
-
if (!this.dialogElement.querySelector('[autofocus]')) {
|
|
778
|
+
// Only set autofocus if the prop is true and no element already has autofocus
|
|
779
|
+
if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {
|
|
767
780
|
this.setAutofocus();
|
|
768
781
|
}
|
|
769
782
|
this.attachEventListeners();
|
|
@@ -782,7 +795,7 @@ const NvDialog = class {
|
|
|
782
795
|
//#region RENDER
|
|
783
796
|
render() {
|
|
784
797
|
const hasForm = this.form || this.el.querySelector('form');
|
|
785
|
-
return (index.h(index.Host, { key: '
|
|
798
|
+
return (index.h(index.Host, { key: '8e4a46dd7749656670d5b8eb167aae2108644375' }, index.h("slot", { key: '954980e2b451c9f5c0e4f09df76c62c1f04ab01e', name: "trigger" }), index.h("dialog", { key: '8541ad521ae348d26764756e45c668f7aab5c278', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx297c1ffe.clsx({ full: this.full }) }, index.h("div", { key: 'cd07e78da6f5cb3abd14640b941629bff034ec63', class: "content" }, !this.undismissable && (index.h("nv-button", { key: '5b610a9d30acd450a273e9dc10a4a29bdf85d58c', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '4e5841c525221c6c23c699deaeefa7492f57e091', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: 'f09fd0f7013b1c2c912ed7958a8a9cab0016858b', class: "content-body", id: "dialog-content" }, index.h("slot", { key: 'c3c196c3e8f40acbb29f3fa89d1620e7beaad10c' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? constants4faa1fae.ButtonType.Submit : constants4faa1fae.ButtonType.Button, onDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
|
|
786
799
|
}
|
|
787
800
|
get el() { return index.getElement(this); }
|
|
788
801
|
static get watchers() { return {
|
package/dist/cjs/{nv-dialogfooter_2.entry-DT3kR9Xn.js → nv-dialogfooter_2.entry-QE1dFuOh.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Cv7U-U85.js');
|
|
4
4
|
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
5
5
|
require('react');
|
|
6
6
|
|
|
@@ -89,7 +89,7 @@ const NvDialogfooter = class {
|
|
|
89
89
|
/****************************************************************************/
|
|
90
90
|
//#region RENDER
|
|
91
91
|
render() {
|
|
92
|
-
return (index.h(index.Host, { key: '
|
|
92
|
+
return (index.h(index.Host, { key: '278895398ddd9fd6aaf6da3d0cbcad12d628f908' }, !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))));
|
|
93
93
|
}
|
|
94
94
|
static get formAssociated() { return true; }
|
|
95
95
|
get el() { return index.getElement(this); }
|
|
@@ -124,7 +124,7 @@ const NvDialogheader = class {
|
|
|
124
124
|
/****************************************************************************/
|
|
125
125
|
//#region RENDER
|
|
126
126
|
render() {
|
|
127
|
-
return (index.h(index.Host, { key: '
|
|
127
|
+
return (index.h(index.Host, { key: '2ace10c91041456a36909763b62a2adeede183c7' }, !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))));
|
|
128
128
|
}
|
|
129
129
|
get el() { return index.getElement(this); }
|
|
130
130
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Cv7U-U85.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -118,13 +118,13 @@ const NvFieldcheckbox = class {
|
|
|
118
118
|
/****************************************************************************/
|
|
119
119
|
//#region RENDER
|
|
120
120
|
render() {
|
|
121
|
-
return (index.h(index.Host, { key: '
|
|
121
|
+
return (index.h(index.Host, { key: '46e0688340e1cda23f1fdbefb349fbaa8bb188f2', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("div", { key: '5769e3e61f69b7a9821864aab6338b13b46db4cc', class: "input-container" }, index.h("input", { key: '0acc841c8583ca1d0781135b95a038703b3be516', 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 && !this.required, required: this.required, indeterminate: this.indeterminate, ref: el => {
|
|
122
122
|
if (el) {
|
|
123
123
|
el.indeterminate = this.indeterminate;
|
|
124
124
|
}
|
|
125
|
-
} }), index.h("span", { key: '
|
|
126
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
127
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
125
|
+
} }), index.h("span", { key: 'a2bdc7fa16b4cb5e266c1666746f88b462ef6bbc', class: "icon" }, this.checked && !this.indeterminate && (index.h("slot", { key: 'aa00b58bb2fb2132b4b355568bbecafbf14d9536', name: "checked-icon" }, index.h("svg", { key: '3d7e92b03fc0ebc0676a5f5a011e0a5f16bb06d9', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: '28170c912acd9442af03c889afc10d348657a84b', d: "M11.6667 3.5L5.25004 9.91667L2.33337 7", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.indeterminate && (index.h("slot", { key: '790eca10b1eea865ecde7be45c00ae3bbf65132b', name: "indeterminate-icon" }, index.h("svg", { key: 'a00b2e00c2e2038dd1d67c43aef4f30e5d7a27e7', class: "indeterminate-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { key: '6e7eb5f117a0244594392a52f932a91056093168', d: "M2.9165 7H11.0832", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), index.h("slot", { key: '4c11bb2b8078adc0d7d5f3c52c2525bc836ad075' }), index.h("div", { key: '323cab79ca6e047df5482d75490ba7288eef5e27', class: "text-container" }, index.h("slot", { key: '5bc6845d98ee06117b97588e71467ce106e1ab60', name: "main" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'ce639cb27b8ea446f2a0d73a36c3c9541bde9ab8', htmlFor: this.inputId, class: clsx297c1ffe.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: 'cd4b650b2f1b064b65211e90fdddff15b0d6f1f4', name: "label" }, this.label))), (this.description ||
|
|
126
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '7de730e025d5eeae626bbe64125479dc9ebb4332', class: "description" }, index.h("slot", { key: '2c2f6343838ffff29e1e920ae927d89e9a63f02e', name: "description" }, this.description)))), (this.errorDescription ||
|
|
127
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'b49fd559c3bf84e814da0093f9af64e62510725d', hidden: !this.error, class: "error-description" }, index.h("slot", { key: 'b15a968201d8ef5ea5e764beac553cf8ca0b87d3', name: "error-description" }, this.errorDescription))))));
|
|
128
128
|
}
|
|
129
129
|
static get formAssociated() { return true; }
|
|
130
130
|
get el() { return index.getElement(this); }
|