@nova-design-system/nova-react 3.14.0 → 3.16.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/dist/cjs/{collapse.animation-acda1bf5-BuORVmQv.js → collapse.animation-6e0b08df-AHWzNGm_.js} +4 -1
- package/dist/cjs/{constants-d0f19e7b-s0SCO_vi.js → constants-69bafca2-DpB_ghPF.js} +9 -0
- package/dist/cjs/{fade.animation-eb454088-Bma0SpTf.js → fade.animation-9b939939-DV--bM4S.js} +2 -2
- package/dist/cjs/{index-CKAZvszR.js → index-7K7BV1CP.js} +4676 -1345
- package/dist/cjs/index.js +10 -2
- package/dist/cjs/{nv-accordion-item.entry-CjBcmF8t.js → nv-accordion-item.entry-C-9tYw-c.js} +6 -5
- package/dist/cjs/{nv-accordion.entry-CRk2Wvt3.js → nv-accordion.entry-BA3mTIdj.js} +7 -6
- package/dist/cjs/{nv-alert.entry-D5qB5xZg.js → nv-alert.entry-Bic-YGW1.js} +13 -12
- package/dist/cjs/nv-avatar.entry-C-yd0YlD.js +68 -0
- package/dist/cjs/{nv-badge_2.entry-BDuX1qOQ.js → nv-badge_2.entry-B_8yvNXL.js} +11 -10
- package/dist/cjs/{nv-breadcrumb.entry-BE9U6AF_.js → nv-breadcrumb.entry-BCTbG942.js} +3 -2
- package/dist/cjs/{nv-breadcrumbs.entry-DJXqtmMR.js → nv-breadcrumbs.entry-C9B5Baf7.js} +2 -1
- package/dist/cjs/nv-button.entry-DgX8Bwmq.js +165 -0
- package/dist/cjs/{nv-buttongroup.entry-C0Zc2lOi.js → nv-buttongroup.entry-CKhZN_Yf.js} +2 -1
- package/dist/cjs/{nv-calendar.entry-NbVLStMN.js → nv-calendar.entry-E6Pk83WA.js} +8 -7
- package/dist/cjs/{nv-col.entry-ahFf8a1Z.js → nv-col.entry-CkZpukX9.js} +2 -1
- package/dist/cjs/{nv-datagrid.entry-C-MJXEdi.js → nv-datagrid.entry-RsfP7vbC.js} +183 -15
- package/dist/cjs/{nv-datagridcolumn.entry-CxU7soW7.js → nv-datagridcolumn.entry-D4VrDWo9.js} +2 -1
- package/dist/cjs/{nv-dialog.entry-WlnaC-w2.js → nv-dialog.entry-BhtWpYHl.js} +34 -30
- package/dist/cjs/{nv-dialogfooter_2.entry-CEWmTnJc.js → nv-dialogfooter_2.entry-BXLYmzYl.js} +6 -5
- package/dist/cjs/{nv-fieldcheckbox.entry-BYhFVrYb.js → nv-fieldcheckbox.entry-D96Nm6DZ.js} +3 -2
- package/dist/cjs/{nv-fielddate.entry-DVVnRiOT.js → nv-fielddate.entry-ty37R9jF.js} +52 -26
- package/dist/cjs/{nv-fielddaterange.entry-Cb4X5Q-C.js → nv-fielddaterange.entry-BSIRu_mq.js} +69 -42
- package/dist/cjs/{nv-fielddropdown.entry-D2PKGkpx.js → nv-fielddropdown.entry-CUzvIoZZ.js} +34 -7
- package/dist/cjs/{nv-fielddropdownitem.entry-BqgMRnIc.js → nv-fielddropdownitem.entry-D-GTxLNk.js} +2 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-Dzw4c9wO.js → nv-fieldmultiselect.entry-DFY2bf6s.js} +188 -156
- package/dist/cjs/{nv-fieldnumber.entry-Cm5g6tw7.js → nv-fieldnumber.entry-CILclJ7Q.js} +3 -2
- package/dist/cjs/{nv-fieldpassword.entry-BMI5M4RR.js → nv-fieldpassword.entry-CdR-NM8e.js} +3 -2
- package/dist/cjs/{nv-fieldradio.entry-BrCJvkMR.js → nv-fieldradio.entry-lC4scIvU.js} +3 -2
- package/dist/cjs/{nv-fieldselect.entry-Cz76Y4Fb.js → nv-fieldselect.entry-CYu6870F.js} +3 -2
- package/dist/cjs/{nv-fieldslider.entry-C2ynnMK8.js → nv-fieldslider.entry-DOuJAR6P.js} +3 -2
- package/dist/cjs/{nv-fieldtext.entry-B6ciu2fU.js → nv-fieldtext.entry-BFLUiPa4.js} +3 -2
- package/dist/cjs/{nv-fieldtextarea.entry-BL_gMvTp.js → nv-fieldtextarea.entry-BeI0k97G.js} +3 -2
- package/dist/cjs/{nv-fieldtime.entry-Be5fujXA.js → nv-fieldtime.entry-C28EAKki.js} +82 -68
- package/dist/cjs/nv-icon.entry-BXgjUpe_.js +80 -0
- package/dist/cjs/{nv-iconbutton_2.entry-Dlk96yHi.js → nv-iconbutton_2.entry-CpIkxrp9.js} +3 -2
- package/dist/cjs/{nv-menu.entry-CDn1Tk9J.js → nv-menu.entry-as-NOsF-.js} +25 -9
- package/dist/cjs/{nv-menuitem.entry-DIkQnha9.js → nv-menuitem.entry-D8KAh6nr.js} +2 -1
- package/dist/cjs/nv-notification.entry-C-_jV-DL.js +262 -0
- package/dist/cjs/nv-notificationcontainer.entry-CMn42loT.js +41 -0
- package/dist/cjs/{nv-popover.entry-Bz9ZWGlN.js → nv-popover.entry--BhEBSir.js} +72 -65
- package/dist/cjs/{nv-row.entry-iJGXINmZ.js → nv-row.entry-BxhcK9aY.js} +3 -2
- package/dist/cjs/{nv-stack.entry-CifEjR2g.js → nv-stack.entry-C3DF9jJZ.js} +3 -2
- package/dist/cjs/nv-table.entry-pfEGt2KH.js +245 -0
- package/dist/cjs/nv-toggle.entry-ChpqtQtn.js +80 -0
- package/dist/cjs/{nv-togglebutton.entry-X4eLeP-C.js → nv-togglebutton.entry-DE7CKmeN.js} +3 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-BYO58vql.js → nv-togglebuttongroup.entry-BJPjdmHD.js} +3 -2
- package/dist/cjs/{nv-tooltip.entry-DaxjQSt1.js → nv-tooltip.entry-D9-Fga6C.js} +3 -2
- package/dist/components/NvDatatable.js +45 -0
- package/dist/generated/components.js +10 -10
- package/dist/generated/components.server.js +9 -17
- package/dist/index.js +2 -0
- package/dist/providers/NotificationProvider.js +83 -0
- package/dist/types/components/NvDatatable.d.ts +25 -0
- package/dist/types/generated/components.d.ts +5 -12
- package/dist/types/generated/components.server.d.ts +5 -12
- package/dist/types/index.d.ts +2 -0
- package/dist/types/providers/NotificationProvider.d.ts +36 -0
- package/package.json +7 -3
- package/dist/cjs/dom.utils-ac71e0ef-CmIwRr6O.js +0 -168
- package/dist/cjs/nv-avatar.entry-CuNYdZl_.js +0 -67
- package/dist/cjs/nv-button.entry-CF5IDcG3.js +0 -164
- package/dist/cjs/nv-icon.entry-C-wbfOy3.js +0 -79
- package/dist/cjs/nv-notification.entry-BiwnZCkF.js +0 -178
- package/dist/cjs/nv-table.entry-Dxg0j3fe.js +0 -338
- package/dist/cjs/nv-tablecolumn.entry--29MFEe9.js +0 -18
- package/dist/cjs/nv-toggle.entry-D0eQoEqf.js +0 -79
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-7K7BV1CP.js');
|
|
4
|
+
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
5
|
var _commonjsHelpers1789f0cf = require('./_commonjsHelpers-1789f0cf-BJu3ubxk.js');
|
|
6
6
|
require('react');
|
|
7
|
+
require('react-dom');
|
|
7
8
|
|
|
8
9
|
var dayjs_min = {exports: {}};
|
|
9
10
|
|
|
@@ -775,9 +776,9 @@ const NvCalendar = class {
|
|
|
775
776
|
this.getDayNames = () => {
|
|
776
777
|
let days;
|
|
777
778
|
// If we have custom day names for this locale
|
|
778
|
-
if (
|
|
779
|
+
if (constants69bafca2.CUSTOM_DAY_NAMES[this.locale]) {
|
|
779
780
|
// Custom day names are expected to start with Monday (index 0 = Monday)
|
|
780
|
-
days = [...
|
|
781
|
+
days = [...constants69bafca2.CUSTOM_DAY_NAMES[this.locale]];
|
|
781
782
|
}
|
|
782
783
|
else {
|
|
783
784
|
// Generate days using Intl.DateTimeFormat, starting from Monday
|
|
@@ -867,8 +868,8 @@ const NvCalendar = class {
|
|
|
867
868
|
/** Initializes the list of formatted months according to the locale */
|
|
868
869
|
this.initializeMonths = () => {
|
|
869
870
|
// If we have custom month names for this locale
|
|
870
|
-
if (
|
|
871
|
-
this.months =
|
|
871
|
+
if (constants69bafca2.CUSTOM_MONTH_NAMES[this.locale]) {
|
|
872
|
+
this.months = constants69bafca2.CUSTOM_MONTH_NAMES[this.locale].map((label, value) => ({
|
|
872
873
|
value,
|
|
873
874
|
label,
|
|
874
875
|
}));
|
|
@@ -886,7 +887,7 @@ const NvCalendar = class {
|
|
|
886
887
|
* @returns {string} Localized abbreviation for "week"
|
|
887
888
|
*/
|
|
888
889
|
this.getLocalizedWeekText = () => {
|
|
889
|
-
return
|
|
890
|
+
return constants69bafca2.WEEK_ABBREVIATIONS[this.locale] || 'W';
|
|
890
891
|
};
|
|
891
892
|
/**
|
|
892
893
|
* Handles month change in the selector
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-7K7BV1CP.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
require('react');
|
|
6
|
+
require('react-dom');
|
|
6
7
|
|
|
7
8
|
const nvColCss = "nv-col{display:block;flex:1 1 0%;padding-left:calc(var(--spacing-4) / 2);padding-right:calc(var(--spacing-4) / 2)}nv-col[class*=w-]{flex:none}nv-col.w-1\\/12{width:calc(100% * 1 / 12)}nv-col.w-2\\/12{width:calc(100% * 2 / 12)}nv-col.w-3\\/12{width:calc(100% * 3 / 12)}nv-col.w-4\\/12{width:calc(100% * 4 / 12)}nv-col.w-5\\/12{width:calc(100% * 5 / 12)}nv-col.w-6\\/12{width:calc(100% * 6 / 12)}nv-col.w-7\\/12{width:calc(100% * 7 / 12)}nv-col.w-8\\/12{width:calc(100% * 8 / 12)}nv-col.w-9\\/12{width:calc(100% * 9 / 12)}nv-col.w-10\\/12{width:calc(100% * 10 / 12)}nv-col.w-11\\/12{width:calc(100% * 11 / 12)}nv-col.w-12\\/12{width:calc(100% * 12 / 12)}";
|
|
8
9
|
const NvColStyle0 = nvColCss;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
5
|
-
var constantsD0f19e7b = require('./constants-d0f19e7b-s0SCO_vi.js');
|
|
3
|
+
var index = require('./index-7K7BV1CP.js');
|
|
4
|
+
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
6
5
|
require('react');
|
|
6
|
+
require('react-dom');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* table-core
|
|
@@ -616,7 +616,7 @@ const arrIncludes = (row, columnId, filterValue) => {
|
|
|
616
616
|
var _row$getValue4;
|
|
617
617
|
return (_row$getValue4 = row.getValue(columnId)) == null ? void 0 : _row$getValue4.includes(filterValue);
|
|
618
618
|
};
|
|
619
|
-
arrIncludes.autoRemove = val => testFalsey(val)
|
|
619
|
+
arrIncludes.autoRemove = val => testFalsey(val);
|
|
620
620
|
const arrIncludesAll = (row, columnId, filterValue) => {
|
|
621
621
|
return !filterValue.some(val => {
|
|
622
622
|
var _row$getValue5;
|
|
@@ -1207,6 +1207,10 @@ const ColumnPinning = {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
};
|
|
1209
1209
|
|
|
1210
|
+
function safelyAccessDocument(_document) {
|
|
1211
|
+
return _document || (typeof document !== 'undefined' ? document : null);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1210
1214
|
//
|
|
1211
1215
|
|
|
1212
1216
|
//
|
|
@@ -1346,7 +1350,7 @@ const ColumnSizing = {
|
|
|
1346
1350
|
columnSizingStart: []
|
|
1347
1351
|
}));
|
|
1348
1352
|
};
|
|
1349
|
-
const contextDocument = _contextDocument
|
|
1353
|
+
const contextDocument = safelyAccessDocument(_contextDocument);
|
|
1350
1354
|
const mouseEvents = {
|
|
1351
1355
|
moveHandler: e => onMove(e.clientX),
|
|
1352
1356
|
upHandler: e => {
|
|
@@ -3289,6 +3293,170 @@ function getSortedRowModel() {
|
|
|
3289
3293
|
}, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));
|
|
3290
3294
|
}
|
|
3291
3295
|
|
|
3296
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3297
|
+
/**
|
|
3298
|
+
* All properties that should be excluded from the deep copy of an HTML element.
|
|
3299
|
+
*/
|
|
3300
|
+
const excludedProps = new Set([
|
|
3301
|
+
// Text and content-related properties
|
|
3302
|
+
'textContent',
|
|
3303
|
+
'innerText',
|
|
3304
|
+
'outerText',
|
|
3305
|
+
'innerHTML',
|
|
3306
|
+
'outerHTML',
|
|
3307
|
+
'text',
|
|
3308
|
+
// Form element properties
|
|
3309
|
+
'value',
|
|
3310
|
+
'defaultValue',
|
|
3311
|
+
'checked',
|
|
3312
|
+
'defaultChecked',
|
|
3313
|
+
'selectionStart',
|
|
3314
|
+
'selectionEnd',
|
|
3315
|
+
'selectionDirection',
|
|
3316
|
+
'form',
|
|
3317
|
+
'willValidate',
|
|
3318
|
+
'validity',
|
|
3319
|
+
'validationMessage',
|
|
3320
|
+
'labels',
|
|
3321
|
+
'list',
|
|
3322
|
+
'maxLength',
|
|
3323
|
+
'minLength',
|
|
3324
|
+
'valueAsDate',
|
|
3325
|
+
'valueAsNumber',
|
|
3326
|
+
// Editability and namespaces
|
|
3327
|
+
'contentEditable',
|
|
3328
|
+
'isContentEditable',
|
|
3329
|
+
'namespaceURI',
|
|
3330
|
+
// Child-related properties (handled recursively)
|
|
3331
|
+
'attributes',
|
|
3332
|
+
'children',
|
|
3333
|
+
'childNodes',
|
|
3334
|
+
'firstChild',
|
|
3335
|
+
'lastChild',
|
|
3336
|
+
// Blazor-related properties
|
|
3337
|
+
'origin',
|
|
3338
|
+
'dataset',
|
|
3339
|
+
'attributeStyleMap',
|
|
3340
|
+
'prefix',
|
|
3341
|
+
'localName',
|
|
3342
|
+
'tagName',
|
|
3343
|
+
'shadowRoot',
|
|
3344
|
+
'assignedSlot',
|
|
3345
|
+
'scrollWidth',
|
|
3346
|
+
'scrollHeight',
|
|
3347
|
+
'clientTop',
|
|
3348
|
+
'clientLeft',
|
|
3349
|
+
'clientWidth',
|
|
3350
|
+
'clientHeight',
|
|
3351
|
+
'firstElementChild',
|
|
3352
|
+
'lastElementChild',
|
|
3353
|
+
'childElementCount',
|
|
3354
|
+
'previousElementSibling',
|
|
3355
|
+
'nextElementSibling',
|
|
3356
|
+
'currentCSSZoom',
|
|
3357
|
+
'nodeType',
|
|
3358
|
+
'nodeName',
|
|
3359
|
+
'baseURI',
|
|
3360
|
+
'isConnected',
|
|
3361
|
+
'ownerDocument',
|
|
3362
|
+
'parentNode',
|
|
3363
|
+
'parentElement',
|
|
3364
|
+
'previousSibling',
|
|
3365
|
+
'nextSibling',
|
|
3366
|
+
'ELEMENT_NODE',
|
|
3367
|
+
'ATTRIBUTE_NODE',
|
|
3368
|
+
'TEXT_NODE',
|
|
3369
|
+
'CDATA_SECTION_NODE',
|
|
3370
|
+
'ENTITY_REFERENCE_NODE',
|
|
3371
|
+
'ENTITY_NODE',
|
|
3372
|
+
'PROCESSING_INSTRUCTION_NODE',
|
|
3373
|
+
'COMMENT_NODE',
|
|
3374
|
+
'DOCUMENT_NODE',
|
|
3375
|
+
'DOCUMENT_TYPE_NODE',
|
|
3376
|
+
'DOCUMENT_FRAGMENT_NODE',
|
|
3377
|
+
'NOTATION_NODE',
|
|
3378
|
+
'DOCUMENT_POSITION_DISCONNECTED',
|
|
3379
|
+
'DOCUMENT_POSITION_PRECEDING',
|
|
3380
|
+
'DOCUMENT_POSITION_FOLLOWING',
|
|
3381
|
+
'DOCUMENT_POSITION_CONTAINS',
|
|
3382
|
+
'DOCUMENT_POSITION_CONTAINED_BY',
|
|
3383
|
+
'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC',
|
|
3384
|
+
]);
|
|
3385
|
+
/**
|
|
3386
|
+
* Deep copy an HTML element with all its attributes, properties, and child nodes.
|
|
3387
|
+
* This method is useful for creating a clone of an element that can be safely modified without affecting the original.
|
|
3388
|
+
* @param {HTMLElement} element - The HTML element to copy.
|
|
3389
|
+
* @returns {HTMLElement} - A deep copy of the HTML element.
|
|
3390
|
+
* @example const copy = deepCopyElement(document.getElementById('myElement'));
|
|
3391
|
+
*/
|
|
3392
|
+
function deepCopyElement(element) {
|
|
3393
|
+
const copy = document.createElement(element.tagName);
|
|
3394
|
+
// ✅ Copy attributes
|
|
3395
|
+
Array.from(element.attributes).forEach(attr => {
|
|
3396
|
+
copy.setAttribute(attr.name, attr.value);
|
|
3397
|
+
});
|
|
3398
|
+
// ✅ Dynamically extract relevant properties
|
|
3399
|
+
const properties = new Set();
|
|
3400
|
+
// Collect only own enumerable properties
|
|
3401
|
+
Object.keys(element).forEach(key => properties.add(key));
|
|
3402
|
+
// Collect inherited properties from prototypes (HTMLElement -> Element -> Node)
|
|
3403
|
+
let proto = Object.getPrototypeOf(element);
|
|
3404
|
+
while (proto && proto !== HTMLElement.prototype) {
|
|
3405
|
+
Object.keys(proto).forEach(key => properties.add(key));
|
|
3406
|
+
proto = Object.getPrototypeOf(proto);
|
|
3407
|
+
}
|
|
3408
|
+
// ✅ Filter and copy only non-function properties (methods are excluded) and non-event listeners
|
|
3409
|
+
properties.forEach(prop => {
|
|
3410
|
+
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
3411
|
+
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
3412
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
3413
|
+
) {
|
|
3414
|
+
try {
|
|
3415
|
+
copy[prop] = element[prop];
|
|
3416
|
+
}
|
|
3417
|
+
catch (error) {
|
|
3418
|
+
console.warn(`Could not copy property ${prop}:`, error.message);
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
});
|
|
3422
|
+
// ✅ Copy dataset separately
|
|
3423
|
+
Object.assign(copy.dataset, element.dataset);
|
|
3424
|
+
// ✅ Handle form elements specifically
|
|
3425
|
+
if (element instanceof HTMLInputElement) {
|
|
3426
|
+
copy.value = element.value;
|
|
3427
|
+
copy.checked = element.checked;
|
|
3428
|
+
copy.defaultValue = element.defaultValue;
|
|
3429
|
+
copy.defaultChecked = element.defaultChecked;
|
|
3430
|
+
copy.selectionStart = element.selectionStart;
|
|
3431
|
+
copy.selectionEnd = element.selectionEnd;
|
|
3432
|
+
copy.selectionDirection = element.selectionDirection;
|
|
3433
|
+
}
|
|
3434
|
+
else if (element instanceof HTMLTextAreaElement) {
|
|
3435
|
+
copy.value = element.value;
|
|
3436
|
+
copy.defaultValue = element.defaultValue;
|
|
3437
|
+
copy.selectionStart = element.selectionStart;
|
|
3438
|
+
copy.selectionEnd = element.selectionEnd;
|
|
3439
|
+
copy.selectionDirection =
|
|
3440
|
+
element.selectionDirection;
|
|
3441
|
+
}
|
|
3442
|
+
else if (element instanceof HTMLSelectElement) {
|
|
3443
|
+
copy.value = element.value;
|
|
3444
|
+
copy.selectedIndex = element.selectedIndex;
|
|
3445
|
+
}
|
|
3446
|
+
// ✅ Recursively copy child nodes (prevent duplicates)
|
|
3447
|
+
element.childNodes.forEach(child => {
|
|
3448
|
+
let childCopy;
|
|
3449
|
+
if (child.nodeType === Node.ELEMENT_NODE) {
|
|
3450
|
+
childCopy = deepCopyElement(child);
|
|
3451
|
+
}
|
|
3452
|
+
else {
|
|
3453
|
+
childCopy = child.cloneNode(true);
|
|
3454
|
+
}
|
|
3455
|
+
copy.appendChild(childCopy);
|
|
3456
|
+
});
|
|
3457
|
+
return copy;
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3292
3460
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3293
3461
|
/**
|
|
3294
3462
|
* Debounce function to prevent multiple calls in a short
|
|
@@ -3309,7 +3477,7 @@ function debounce(func, wait) {
|
|
|
3309
3477
|
};
|
|
3310
3478
|
}
|
|
3311
3479
|
|
|
3312
|
-
const nvDatagridCss = "nv-datagrid{--nv-datagrid-border-default:var(\n --components-form-field-border-default\n );--nv-datagrid-border-hover:var(--components-form-field-border-hover);--nv-datagrid-border-focus:var(--components-form-field-border-default);--nv-datagrid-background-default:var(\n --components-form-field-background-default\n );--nv-datagrid-background-checked:var(\n --components-form-field-background-checked\n );--nv-datagrid-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-datagrid-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-datagrid-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-datagrid-outline-color:var(--color-focus-brand);display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-header-border);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:
|
|
3480
|
+
const nvDatagridCss = "nv-datagrid{--nv-datagrid-border-default:var(\n --components-form-field-border-default\n );--nv-datagrid-border-hover:var(--components-form-field-border-hover);--nv-datagrid-border-focus:var(--components-form-field-border-default);--nv-datagrid-background-default:var(\n --components-form-field-background-default\n );--nv-datagrid-background-checked:var(\n --components-form-field-background-checked\n );--nv-datagrid-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-datagrid-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-datagrid-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-datagrid-outline-color:var(--color-focus-brand);display:block}nv-datagrid .hidden{display:none}nv-datagrid table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-datagrid th{text-align:left;border-bottom:1px solid var(--components-datagrid-header-border);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:var(--font-weight-high-emphasis);color:var(--components-datagrid-header-text)}nv-datagrid td{border-bottom:1px solid var(--components-datagrid-body-border);height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-md);font-weight:var(--font-weight-low-emphasis);color:var(--components-datagrid-body-text);white-space:nowrap;text-overflow:ellipsis}nv-datagrid tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}nv-datagrid .cursor-pointer{cursor:pointer}nv-datagrid .select-none{-webkit-user-select:none;user-select:none}nv-datagrid .search-container{display:flex}nv-datagrid .checkbox-container{position:relative;color:var(--nv-datagrid-color-checked)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-datagrid-color-disabled)}nv-datagrid .checkbox-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-datagrid-border-default);background:var(--nv-datagrid-background-default)}nv-datagrid .checkbox-container input[type=checkbox]:hover{border-color:var(--nv-datagrid-border-hover)}nv-datagrid .checkbox-container input[type=checkbox]:focus{border-color:var(--nv-datagrid-border-focus)}nv-datagrid .checkbox-container input[type=checkbox]:focus,nv-datagrid .checkbox-container input[type=checkbox]:focus-within{outline:none}nv-datagrid .checkbox-container input[type=checkbox]:focus-visible,nv-datagrid .checkbox-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-datagrid-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-datagrid .checkbox-container input[type=checkbox]:checked,nv-datagrid .checkbox-container input[type=checkbox]:indeterminate{background:var(--nv-datagrid-background-checked);border-color:var(--nv-datagrid-background-checked)}nv-datagrid .checkbox-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-datagrid-background-disabled);border-color:var(--nv-datagrid-border-default)}nv-datagrid .checkbox-container input[type=checkbox][readonly]{opacity:0.5}nv-datagrid .checkbox-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-datagrid .checkbox-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}";
|
|
3313
3481
|
const NvDatagridStyle0 = nvDatagridCss;
|
|
3314
3482
|
|
|
3315
3483
|
const NvDatagrid = class {
|
|
@@ -3464,9 +3632,9 @@ const NvDatagrid = class {
|
|
|
3464
3632
|
return;
|
|
3465
3633
|
const nextOrder = header.column.getNextSortingOrder();
|
|
3466
3634
|
switch (nextOrder) {
|
|
3467
|
-
case
|
|
3635
|
+
case constants69bafca2.SortingPossibility.Asc:
|
|
3468
3636
|
return 'Sort ascending';
|
|
3469
|
-
case
|
|
3637
|
+
case constants69bafca2.SortingPossibility.Desc:
|
|
3470
3638
|
return 'Sort descending';
|
|
3471
3639
|
default:
|
|
3472
3640
|
return 'Clear sort';
|
|
@@ -3486,12 +3654,12 @@ const NvDatagrid = class {
|
|
|
3486
3654
|
const key = col.accessor;
|
|
3487
3655
|
const cellSlot = col.querySelector('[slot="cell"]');
|
|
3488
3656
|
if (cellSlot) {
|
|
3489
|
-
const element =
|
|
3657
|
+
const element = deepCopyElement(cellSlot);
|
|
3490
3658
|
this.templateCache.set(key, element);
|
|
3491
3659
|
}
|
|
3492
3660
|
const headerSlot = col.querySelector('[slot="header"]');
|
|
3493
3661
|
if (headerSlot) {
|
|
3494
|
-
const element =
|
|
3662
|
+
const element = deepCopyElement(headerSlot);
|
|
3495
3663
|
this.headerTemplateCache.set(key, element);
|
|
3496
3664
|
}
|
|
3497
3665
|
else {
|
|
@@ -3924,7 +4092,7 @@ const NvDatagrid = class {
|
|
|
3924
4092
|
}
|
|
3925
4093
|
// Handle <template> elements correctly
|
|
3926
4094
|
const templateContent = template instanceof HTMLTemplateElement ? template.content : template;
|
|
3927
|
-
const element =
|
|
4095
|
+
const element = deepCopyElement(templateContent);
|
|
3928
4096
|
// Replace placeholders in text content, attributes, and properties
|
|
3929
4097
|
element.querySelectorAll('*').forEach(el => {
|
|
3930
4098
|
// Replace placeholders in text content
|
|
@@ -4106,7 +4274,7 @@ const NvDatagrid = class {
|
|
|
4106
4274
|
properties.forEach(prop => {
|
|
4107
4275
|
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
4108
4276
|
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
4109
|
-
!
|
|
4277
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
4110
4278
|
) {
|
|
4111
4279
|
const propValue = element[prop];
|
|
4112
4280
|
if (typeof propValue === 'string' && propValue.includes('__')) {
|
|
@@ -4138,7 +4306,7 @@ const NvDatagrid = class {
|
|
|
4138
4306
|
properties.forEach(prop => {
|
|
4139
4307
|
if (typeof element[prop] !== 'function' && // Ignore methods
|
|
4140
4308
|
!prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)
|
|
4141
|
-
!
|
|
4309
|
+
!excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props
|
|
4142
4310
|
) {
|
|
4143
4311
|
try {
|
|
4144
4312
|
const propValue = element[prop];
|
|
@@ -4158,10 +4326,10 @@ const NvDatagrid = class {
|
|
|
4158
4326
|
if (!header.column.getCanSort())
|
|
4159
4327
|
return null;
|
|
4160
4328
|
const sortState = header.column.getIsSorted();
|
|
4161
|
-
if (sortState ===
|
|
4329
|
+
if (sortState === constants69bafca2.SortingPossibility.Asc) {
|
|
4162
4330
|
return (index.h("div", { class: "inline-flex align-middle" }, index.h("nv-icon", { name: "arrow-up" })));
|
|
4163
4331
|
}
|
|
4164
|
-
if (sortState ===
|
|
4332
|
+
if (sortState === constants69bafca2.SortingPossibility.Desc) {
|
|
4165
4333
|
return (index.h("div", { class: "inline-flex align-middle" }, index.h("nv-icon", { name: "arrow-down" })));
|
|
4166
4334
|
}
|
|
4167
4335
|
return null;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-7K7BV1CP.js');
|
|
4
4
|
var events_utilsFe1d907f = require('./events.utils-fe1d907f-01N__3wY.js');
|
|
5
5
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
6
|
-
var
|
|
6
|
+
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
7
7
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
8
8
|
require('react');
|
|
9
|
+
require('react-dom');
|
|
9
10
|
|
|
10
11
|
/*!
|
|
11
12
|
* tabbable 6.2.0
|
|
@@ -541,7 +542,7 @@ var tabbable = function tabbable(container, options) {
|
|
|
541
542
|
return sortByOrder(candidates);
|
|
542
543
|
};
|
|
543
544
|
|
|
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
|
|
545
|
+
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:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text)}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
546
|
const NvDialogStyle0 = nvDialogCss;
|
|
546
547
|
|
|
547
548
|
const NvDialog = class {
|
|
@@ -549,6 +550,18 @@ const NvDialog = class {
|
|
|
549
550
|
index.registerInstance(this, hostRef);
|
|
550
551
|
this.openChanged = index.createEvent(this, "openChanged");
|
|
551
552
|
this.eventsAttached = false;
|
|
553
|
+
this.triggerClickEvents = [
|
|
554
|
+
['click', this.show],
|
|
555
|
+
[
|
|
556
|
+
'keydown',
|
|
557
|
+
(e) => {
|
|
558
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
559
|
+
e.preventDefault();
|
|
560
|
+
this.show();
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
],
|
|
564
|
+
];
|
|
552
565
|
/**
|
|
553
566
|
* Use this prop to toggle the visibility of the dialog. Set to true to show
|
|
554
567
|
* the dialog and false to hide it.
|
|
@@ -603,18 +616,6 @@ const NvDialog = class {
|
|
|
603
616
|
event.stopPropagation();
|
|
604
617
|
}
|
|
605
618
|
};
|
|
606
|
-
this.triggerClickEvents = [
|
|
607
|
-
['click', this.show],
|
|
608
|
-
[
|
|
609
|
-
'keydown',
|
|
610
|
-
(e) => {
|
|
611
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
612
|
-
e.preventDefault();
|
|
613
|
-
this.show();
|
|
614
|
-
}
|
|
615
|
-
},
|
|
616
|
-
],
|
|
617
|
-
];
|
|
618
619
|
}
|
|
619
620
|
//#endregion PROPERTIES
|
|
620
621
|
/****************************************************************************/
|
|
@@ -695,6 +696,22 @@ const NvDialog = class {
|
|
|
695
696
|
}
|
|
696
697
|
return formElement.id;
|
|
697
698
|
}
|
|
699
|
+
//#endregion EVENTS
|
|
700
|
+
/****************************************************************************/
|
|
701
|
+
//#region WATCHERS
|
|
702
|
+
async handleDialogOpenChange(isOpen) {
|
|
703
|
+
if (isOpen) {
|
|
704
|
+
this.show();
|
|
705
|
+
this.openChanged.emit(isOpen);
|
|
706
|
+
}
|
|
707
|
+
else {
|
|
708
|
+
this.close();
|
|
709
|
+
this.openChanged.emit(isOpen);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
//#endregion WATCHERS
|
|
713
|
+
/****************************************************************************/
|
|
714
|
+
//#region LISTENERS
|
|
698
715
|
/**
|
|
699
716
|
* Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.
|
|
700
717
|
* @param {KeyboardEvent} event - The keydown event.
|
|
@@ -719,20 +736,7 @@ const NvDialog = class {
|
|
|
719
736
|
return;
|
|
720
737
|
this.handleClickOutside(event);
|
|
721
738
|
}
|
|
722
|
-
//#endregion
|
|
723
|
-
/****************************************************************************/
|
|
724
|
-
//#region WATCHERS
|
|
725
|
-
async handleDialogOpenChange(isOpen) {
|
|
726
|
-
if (isOpen) {
|
|
727
|
-
this.show();
|
|
728
|
-
this.openChanged.emit(isOpen);
|
|
729
|
-
}
|
|
730
|
-
else {
|
|
731
|
-
this.close();
|
|
732
|
-
this.openChanged.emit(isOpen);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
//#endregion WATCHERS
|
|
739
|
+
//#endregion LISTENERS
|
|
736
740
|
/****************************************************************************/
|
|
737
741
|
//#region LIFECYCLE
|
|
738
742
|
/**
|
|
@@ -782,7 +786,7 @@ const NvDialog = class {
|
|
|
782
786
|
//#region RENDER
|
|
783
787
|
render() {
|
|
784
788
|
const hasForm = this.form || this.el.querySelector('form');
|
|
785
|
-
return (index.h(index.Host, { key: '
|
|
789
|
+
return (index.h(index.Host, { key: 'b32680019247cf7e39b5861a77dce61e08eadd7b' }, index.h("slot", { key: '104978b5cccd97997955a6c0db21f9549643f40a', name: "trigger" }), index.h("dialog", { key: '951a58755ac49f6c2b2f427599d5bc2540c65e2e', 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: '96b727e70efe35991086ead905f925af28808cb8', class: "content" }, !this.undismissable && (index.h("nv-button", { key: '36f2214d2ed81d7b85c3c523f490e75ca2bffc68', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleDialogClose, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '7a50fc4e330e7ab67bba0fa429c5cd92630014bc', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: 'cf4269a73467794d0158a4e56f34e2a81edd6643', class: "content-body", id: "dialog-content" }, index.h("slot", { key: 'f91e72aafdd2f5de65ae78262f274b83bd37560d' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? constants69bafca2.ButtonType.Submit : constants69bafca2.ButtonType.Button, onDialogCanceled: this.handleDialogClose, undismissable: this.undismissable }))))));
|
|
786
790
|
}
|
|
787
791
|
get el() { return index.getElement(this); }
|
|
788
792
|
static get watchers() { return {
|
package/dist/cjs/{nv-dialogfooter_2.entry-CEWmTnJc.js → nv-dialogfooter_2.entry-BXLYmzYl.js}
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-7K7BV1CP.js');
|
|
4
|
+
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
5
|
require('react');
|
|
6
|
+
require('react-dom');
|
|
6
7
|
|
|
7
8
|
const nvDialogfooterCss = "nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}";
|
|
8
9
|
const NvDialogfooterStyle0 = nvDialogfooterCss;
|
|
@@ -85,8 +86,8 @@ const NvDialogfooter = class {
|
|
|
85
86
|
// Set the default button type based on the form property
|
|
86
87
|
this.primaryButtonType =
|
|
87
88
|
this.primaryButtonType || this.form
|
|
88
|
-
?
|
|
89
|
-
:
|
|
89
|
+
? constants69bafca2.ButtonType.Submit
|
|
90
|
+
: constants69bafca2.ButtonType.Button;
|
|
90
91
|
}
|
|
91
92
|
//#endregion LIFECYCLE
|
|
92
93
|
/****************************************************************************/
|
|
@@ -99,7 +100,7 @@ const NvDialogfooter = class {
|
|
|
99
100
|
};
|
|
100
101
|
NvDialogfooter.style = NvDialogfooterStyle0;
|
|
101
102
|
|
|
102
|
-
const nvDialogheaderCss = "nv-dialogheader{padding:var(--dialog-header-padding-top) var(--dialog-header-padding-x) var(--dialog-header-padding-bottom) var(--dialog-header-padding-x);justify-content:space-between;align-items:flex-start;align-self:stretch}nv-dialogheader .heading{color:var(--color-content-high-text);font-family
|
|
103
|
+
const nvDialogheaderCss = "nv-dialogheader{padding:var(--dialog-header-padding-top) var(--dialog-header-padding-x) var(--dialog-header-padding-bottom) var(--dialog-header-padding-x);justify-content:space-between;align-items:flex-start;align-self:stretch}nv-dialogheader .heading{color:var(--color-content-high-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-lg);font-style:normal;font-weight:var(--font-weight-medium-emphasis);padding-right:var(--spacing-7);line-height:var(--leading-px-6);letter-spacing:var(--letter-spacing-heading-xs)}nv-dialogheader .subheading{color:var(--color-content-low-text);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-sm);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-sm);}";
|
|
103
104
|
const NvDialogheaderStyle0 = nvDialogheaderCss;
|
|
104
105
|
|
|
105
106
|
const NvDialogheader = class {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-7K7BV1CP.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
7
|
+
require('react-dom');
|
|
7
8
|
|
|
8
|
-
const nvFieldcheckboxCss = "nv-fieldcheckbox{--nv-fieldcheckbox-border-default:var(\n --components-form-field-border-default\n );--nv-fieldcheckbox-border-hover:var(--components-form-field-border-hover);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-default);--nv-fieldcheckbox-background-default:var(\n --components-form-field-background-default\n );--nv-fieldcheckbox-background-checked:var(\n --components-form-field-background-checked\n );--nv-fieldcheckbox-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-brand);--nv-fieldcheckbox-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-fieldcheckbox-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-fieldcheckbox-outline-color:var(--color-focus-brand);display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-fieldcheckbox:not([disabled],[readonly]) input,nv-fieldcheckbox:not([disabled],[readonly]) label{cursor:pointer}nv-fieldcheckbox.error>.input-container{--nv-fieldcheckbox-border-default:var(--components-form-field-border-error);--nv-fieldcheckbox-border-hover:var(--nv-fieldcheckbox-border-default);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-error);--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-destructive);--nv-fieldcheckbox-color-disabled:var(\n --components-form-shape-foreground-disabled-error\n );--nv-fieldcheckbox-background-checked:var(\n --components-form-field-background-error\n );--nv-fieldcheckbox-outline-color:var(--color-focus-destructive)}nv-fieldcheckbox.label-placement-before{flex-direction:row-reverse}nv-fieldcheckbox[disabled]:not([disabled=false]){opacity:0.5}nv-fieldcheckbox>.input-container{position:relative;color:var(--nv-fieldcheckbox-color-checked)}nv-fieldcheckbox>.input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox>.input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-fieldcheckbox-color-disabled)}nv-fieldcheckbox>.input-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-fieldcheckbox-border-default);background:var(--nv-fieldcheckbox-background-default)}nv-fieldcheckbox>.input-container input[type=checkbox]:hover{border-color:var(--nv-fieldcheckbox-border-hover)}nv-fieldcheckbox>.input-container input[type=checkbox]:focus{border-color:var(--nv-fieldcheckbox-border-focus)}nv-fieldcheckbox>.input-container input[type=checkbox]:focus,nv-fieldcheckbox>.input-container input[type=checkbox]:focus-within{outline:none}nv-fieldcheckbox>.input-container input[type=checkbox]:focus-visible,nv-fieldcheckbox>.input-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-fieldcheckbox-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-fieldcheckbox>.input-container input[type=checkbox]:checked,nv-fieldcheckbox>.input-container input[type=checkbox]:indeterminate{background:var(--nv-fieldcheckbox-background-checked);border-color:var(--nv-fieldcheckbox-background-checked)}nv-fieldcheckbox>.input-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-fieldcheckbox-background-disabled);border-color:var(--nv-fieldcheckbox-border-default)}nv-fieldcheckbox>.input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox>.input-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-fieldcheckbox>.input-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}nv-fieldcheckbox>.text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}nv-fieldcheckbox>.text-container label{align-self:stretch;color:var(--components-form-text-label-default);font-family
|
|
9
|
+
const nvFieldcheckboxCss = "nv-fieldcheckbox{--nv-fieldcheckbox-border-default:var(\n --components-form-field-border-default\n );--nv-fieldcheckbox-border-hover:var(--components-form-field-border-hover);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-default);--nv-fieldcheckbox-background-default:var(\n --components-form-field-background-default\n );--nv-fieldcheckbox-background-checked:var(\n --components-form-field-background-checked\n );--nv-fieldcheckbox-background-disabled:var(\n --components-form-field-background-disabled\n );--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-brand);--nv-fieldcheckbox-color-checked:var(\n --components-form-shape-foreground-default\n );--nv-fieldcheckbox-color-disabled:var(\n --components-form-shape-foreground-disabled\n );--nv-fieldcheckbox-outline-color:var(--color-focus-brand);display:inline-flex;align-items:flex-start;gap:var(--form-gap-x);position:relative}nv-fieldcheckbox:not([disabled],[readonly]) input,nv-fieldcheckbox:not([disabled],[readonly]) label{cursor:pointer}nv-fieldcheckbox.error>.input-container{--nv-fieldcheckbox-border-default:var(--components-form-field-border-error);--nv-fieldcheckbox-border-hover:var(--nv-fieldcheckbox-border-default);--nv-fieldcheckbox-border-focus:var(--components-form-field-border-error);--nv-fieldcheckbox-focus-box-shadow:var(--color-focus-destructive);--nv-fieldcheckbox-color-disabled:var(\n --components-form-shape-foreground-disabled-error\n );--nv-fieldcheckbox-background-checked:var(\n --components-form-field-background-error\n );--nv-fieldcheckbox-outline-color:var(--color-focus-destructive)}nv-fieldcheckbox.label-placement-before{flex-direction:row-reverse}nv-fieldcheckbox[disabled]:not([disabled=false]){opacity:0.5}nv-fieldcheckbox>.input-container{position:relative;color:var(--nv-fieldcheckbox-color-checked)}nv-fieldcheckbox>.input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox>.input-container:has(input[type=checkbox]:disabled:not([readonly])){color:var(--nv-fieldcheckbox-color-disabled)}nv-fieldcheckbox>.input-container input[type=checkbox]{appearance:none;position:relative;display:flex;width:var(--form-checkbox-size);height:var(--form-checkbox-size);flex-direction:column;align-items:flex-start;border-radius:var(--form-checkbox-radius);border-width:var(--form-checkbox-border-width);border-style:solid;border-color:var(--nv-fieldcheckbox-border-default);background:var(--nv-fieldcheckbox-background-default)}nv-fieldcheckbox>.input-container input[type=checkbox]:hover{border-color:var(--nv-fieldcheckbox-border-hover)}nv-fieldcheckbox>.input-container input[type=checkbox]:focus{border-color:var(--nv-fieldcheckbox-border-focus)}nv-fieldcheckbox>.input-container input[type=checkbox]:focus,nv-fieldcheckbox>.input-container input[type=checkbox]:focus-within{outline:none}nv-fieldcheckbox>.input-container input[type=checkbox]:focus-visible,nv-fieldcheckbox>.input-container input[type=checkbox]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-fieldcheckbox-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-fieldcheckbox>.input-container input[type=checkbox]:checked,nv-fieldcheckbox>.input-container input[type=checkbox]:indeterminate{background:var(--nv-fieldcheckbox-background-checked);border-color:var(--nv-fieldcheckbox-background-checked)}nv-fieldcheckbox>.input-container input[type=checkbox]:disabled:not([readonly]){background:var(--nv-fieldcheckbox-background-disabled);border-color:var(--nv-fieldcheckbox-border-default)}nv-fieldcheckbox>.input-container input[type=checkbox][readonly]{opacity:0.5}nv-fieldcheckbox>.input-container .icon{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}nv-fieldcheckbox>.input-container .icon svg{width:var(--form-checkbox-icon-size);height:var(--form-checkbox-icon-size);fill:none;stroke:currentcolor;stroke-width:var(--form-checkbox-icon-stroke);flex-shrink:0}nv-fieldcheckbox>.text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}nv-fieldcheckbox>.text-container label{align-self:stretch;text-align:left;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--form-label-font-weight);line-height:var(--form-label-line-height)}nv-fieldcheckbox>.text-container label.visually-hidden{position:absolute;padding:0;border:0;overflow:hidden;white-space:nowrap;width:1px;height:1px;margin:-1px;clip:rect(0, 0, 0, 0)}nv-fieldcheckbox>.text-container .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height)}nv-fieldcheckbox>.text-container .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
9
10
|
const NvFieldcheckboxStyle0 = nvFieldcheckboxCss;
|
|
10
11
|
|
|
11
12
|
const NvFieldcheckbox = class {
|