@nova-design-system/nova-react 3.3.0 → 3.4.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/{index-BlWxX8x6.js → index-CrgVjOZF.js} +378 -287
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{nv-alert.entry-BLGSitrm.js → nv-alert.entry-CW72ajnD.js} +1 -1
- package/dist/cjs/{nv-avatar.entry-CRcLMbEx.js → nv-avatar.entry-D9wUCu5K.js} +1 -1
- package/dist/cjs/{nv-badge_2.entry-BtDAr7_d.js → nv-badge_2.entry-CQs2Sf6G.js} +1 -1
- package/dist/cjs/{nv-breadcrumb.entry-PVDZoF9i.js → nv-breadcrumb.entry-CGrSsjAL.js} +1 -1
- package/dist/cjs/{nv-breadcrumbs.entry-BY169s5F.js → nv-breadcrumbs.entry-HStUGnwu.js} +1 -1
- package/dist/cjs/{nv-button.entry-BpxpxFJP.js → nv-button.entry-BJfYc4Ow.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-BobyjFdK.js → nv-calendar.entry-Co8f_3E5.js} +21 -5
- package/dist/cjs/{nv-col.entry-B4BJXJw-.js → nv-col.entry-PJML3P46.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-D5UVDiYl.js → nv-datagrid.entry-Bpwt9yDb.js} +45 -12
- package/dist/cjs/{nv-datagridcolumn.entry-dmpcmCIT.js → nv-datagridcolumn.entry-Dfifeiia.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-BYovzkco.js → nv-dialog.entry-eUEzDdrS.js} +1 -1
- package/dist/cjs/{nv-dialogfooter_2.entry-C9dhLKRM.js → nv-dialogfooter_2.entry-HQyyE6VN.js} +1 -1
- package/dist/cjs/{nv-fieldcheckbox.entry-BvFqY2dM.js → nv-fieldcheckbox.entry-C5AMgttR.js} +1 -1
- package/dist/cjs/{nv-fielddate.entry-CSpAcEXW.js → nv-fielddate.entry-Dkqz-UqJ.js} +1 -1
- package/dist/cjs/{nv-fielddaterange.entry-C14o96dd.js → nv-fielddaterange.entry-D6QmyWHp.js} +29 -6
- package/dist/cjs/{nv-fielddropdown.entry-C3VzNRhh.js → nv-fielddropdown.entry-BpZz90ob.js} +1 -1
- package/dist/cjs/{nv-fielddropdownitem.entry-D4G4Ytus.js → nv-fielddropdownitem.entry-BbJ9SKGo.js} +1 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-Ci43ZvzC.js → nv-fieldmultiselect.entry-mnYvhkj0.js} +1 -1
- package/dist/cjs/{nv-fieldnumber.entry-nvUi-64H.js → nv-fieldnumber.entry-B5ED8fCU.js} +4 -4
- package/dist/cjs/{nv-fieldpassword.entry-C2uqwDah.js → nv-fieldpassword.entry-ohASip15.js} +4 -4
- package/dist/cjs/{nv-fieldradio.entry-DL2GdKqO.js → nv-fieldradio.entry-BPipemAC.js} +4 -4
- package/dist/cjs/{nv-fieldselect.entry-D4AIRE24.js → nv-fieldselect.entry-BWZX6L-B.js} +6 -6
- package/dist/cjs/{nv-fieldslider.entry-BNge4J69.js → nv-fieldslider.entry-nmE8TjBA.js} +8 -8
- package/dist/cjs/{nv-fieldtext.entry-BI-fdkdX.js → nv-fieldtext.entry-DxoznMYV.js} +4 -4
- package/dist/cjs/{nv-fieldtextarea.entry-Ct0g9Qtb.js → nv-fieldtextarea.entry-BccBiMKe.js} +4 -4
- package/dist/cjs/{nv-fieldtime.entry-CmO96Py1.js → nv-fieldtime.entry-BmQ5DFbN.js} +10 -10
- package/dist/cjs/{nv-icon.entry-TepdQ1jA.js → nv-icon.entry-DE-sMmDp.js} +2 -2
- package/dist/cjs/{nv-iconbutton_2.entry-B7Xyut9H.js → nv-iconbutton_2.entry-DguqeTa3.js} +3 -3
- package/dist/cjs/{nv-menu.entry-DHrRi_37.js → nv-menu.entry-UTPRtlti.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-B_D1pSYa.js → nv-menuitem.entry-CaRqhVtk.js} +2 -2
- package/dist/cjs/{nv-popover.entry-DyQPEQ4I.js → nv-popover.entry-ByFhVB2j.js} +3 -3
- package/dist/cjs/{nv-row.entry-CDTv7ikK.js → nv-row.entry-BIwxIl3Q.js} +2 -2
- package/dist/cjs/{nv-stack.entry-A78c6BVf.js → nv-stack.entry-xDwyG0Xr.js} +2 -2
- package/dist/cjs/{nv-table.entry-DkwcfdJM.js → nv-table.entry-DCMcpbpc.js} +3 -3
- package/dist/cjs/{nv-tablecolumn.entry-C8VNSpDf.js → nv-tablecolumn.entry-D_kTZ7Mp.js} +1 -1
- package/dist/cjs/{nv-toggle.entry-vxSyUDKZ.js → nv-toggle.entry-tds7tIzF.js} +3 -3
- package/dist/cjs/{nv-tooltip.entry-BQKXRp4d.js → nv-tooltip.entry-PfQ2HgFG.js} +2 -2
- package/dist/generated/components.js +2 -1
- package/dist/types/generated/components.d.ts +11 -0
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
6
6
|
var timeline_animation1b88f052 = require('./timeline.animation-1b88f052-B8-vCVrY.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var timeline_animation1b88f052 = require('./timeline.animation-1b88f052-B8-vCVrY.js');
|
|
6
6
|
var fade_animation2a077983 = require('./fade.animation-2a077983-aKN0EDTo.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
require('react');
|
|
5
5
|
|
|
6
6
|
const nvBreadcrumbsCss = "nv-breadcrumbs{display:block}nv-breadcrumbs>ol{display:flex;flex-wrap:wrap;align-items:center;gap:var(--breadcrumb-padding-y)}nv-breadcrumbs nv-breadcrumb:last-child [data-scope=separator],nv-breadcrumbs nv-breadcrumb:last-child [slot=separator]{display:none}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
5
5
|
var _commonjsHelpers1789f0cf = require('./_commonjsHelpers-1789f0cf-BJu3ubxk.js');
|
|
6
6
|
require('react');
|
|
@@ -235,10 +235,26 @@ function parseDate(dateInput, dateFormat) {
|
|
|
235
235
|
parsed = dayjs(dateInput, dateFormat, true);
|
|
236
236
|
}
|
|
237
237
|
if (!parsed.isValid()) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
+
}
|
|
242
258
|
return null;
|
|
243
259
|
}
|
|
244
260
|
return parsed.toDate();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.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');
|
|
@@ -3317,6 +3317,7 @@ const NvDatagrid = class {
|
|
|
3317
3317
|
index.registerInstance(this, hostRef);
|
|
3318
3318
|
this.action = index.createEvent(this, "action");
|
|
3319
3319
|
this.selectedRows = index.createEvent(this, "selectedRows");
|
|
3320
|
+
this.stateChanged = index.createEvent(this, "stateChanged");
|
|
3320
3321
|
this.templateCache = new Map();
|
|
3321
3322
|
this.headerTemplateCache = new Map();
|
|
3322
3323
|
this.minPageIndex = 1;
|
|
@@ -3328,7 +3329,7 @@ const NvDatagrid = class {
|
|
|
3328
3329
|
this.globalFilterSearchTerm = '';
|
|
3329
3330
|
this.columnData = [];
|
|
3330
3331
|
this.paginationState = null;
|
|
3331
|
-
this.
|
|
3332
|
+
this.sortingState = [];
|
|
3332
3333
|
this.rowSelectionState = {};
|
|
3333
3334
|
//#endregion STATES
|
|
3334
3335
|
/****************************************************************************/
|
|
@@ -3408,6 +3409,10 @@ const NvDatagrid = class {
|
|
|
3408
3409
|
* Whether to enable row selection for the data grid.
|
|
3409
3410
|
*/
|
|
3410
3411
|
this.enableRowSelection = false;
|
|
3412
|
+
/**
|
|
3413
|
+
* The overall state
|
|
3414
|
+
*/
|
|
3415
|
+
this.state = null;
|
|
3411
3416
|
this.debouncedFilter = debounce((value) => {
|
|
3412
3417
|
var _a;
|
|
3413
3418
|
(_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
|
|
@@ -3685,10 +3690,10 @@ const NvDatagrid = class {
|
|
|
3685
3690
|
if (this.enableSorting) {
|
|
3686
3691
|
tableOptions.getSortedRowModel = getSortedRowModel();
|
|
3687
3692
|
tableOptions.enableSorting = this.enableSorting;
|
|
3688
|
-
tableOptions.state.sorting = this.
|
|
3693
|
+
tableOptions.state.sorting = this.sortingState;
|
|
3689
3694
|
tableOptions.onSortingChange = updater => {
|
|
3690
|
-
const newSorting = typeof updater === 'function' ? updater(this.
|
|
3691
|
-
this.
|
|
3695
|
+
const newSorting = typeof updater === 'function' ? updater(this.sortingState) : updater;
|
|
3696
|
+
this.sortingState = newSorting; // Will automatically trigger the searchTerm watcher and update the table
|
|
3692
3697
|
};
|
|
3693
3698
|
}
|
|
3694
3699
|
if (this.enableRowSelection) {
|
|
@@ -4226,7 +4231,7 @@ const NvDatagrid = class {
|
|
|
4226
4231
|
this.table.options.state.pagination = newValue;
|
|
4227
4232
|
}
|
|
4228
4233
|
}
|
|
4229
|
-
|
|
4234
|
+
handleSortingState(newValue) {
|
|
4230
4235
|
if (!this.table) {
|
|
4231
4236
|
console.warn('Table is not initialized yet.');
|
|
4232
4237
|
return;
|
|
@@ -4259,6 +4264,33 @@ const NvDatagrid = class {
|
|
|
4259
4264
|
this.table.options.state.rowSelection = newValue;
|
|
4260
4265
|
}
|
|
4261
4266
|
}
|
|
4267
|
+
handleStateChange(newValue) {
|
|
4268
|
+
if (newValue) {
|
|
4269
|
+
// Only update internal state if values are different to avoid loops
|
|
4270
|
+
if (this.globalFilterSearchTerm !== newValue.globalFilterSearchTerm) {
|
|
4271
|
+
this.globalFilterSearchTerm = newValue.globalFilterSearchTerm;
|
|
4272
|
+
}
|
|
4273
|
+
if (JSON.stringify(this.paginationState) !==
|
|
4274
|
+
JSON.stringify(newValue.paginationState)) {
|
|
4275
|
+
this.paginationState = newValue.paginationState;
|
|
4276
|
+
}
|
|
4277
|
+
if (JSON.stringify(this.sortingState) !==
|
|
4278
|
+
JSON.stringify(newValue.sortingState)) {
|
|
4279
|
+
this.sortingState = newValue.sortingState;
|
|
4280
|
+
}
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
// Add watchers for internal state to emit changes
|
|
4284
|
+
handleInternalStateChange() {
|
|
4285
|
+
// Only emit if the state has actually changed
|
|
4286
|
+
const newState = {
|
|
4287
|
+
globalFilterSearchTerm: this.globalFilterSearchTerm,
|
|
4288
|
+
paginationState: this.paginationState,
|
|
4289
|
+
sortingState: this.sortingState,
|
|
4290
|
+
};
|
|
4291
|
+
// Emit the new state and let the parent component update the prop
|
|
4292
|
+
this.stateChanged.emit(newState);
|
|
4293
|
+
}
|
|
4262
4294
|
//#endregion WATCHERS
|
|
4263
4295
|
/****************************************************************************/
|
|
4264
4296
|
//#region LIFECYCLE
|
|
@@ -4289,7 +4321,7 @@ const NvDatagrid = class {
|
|
|
4289
4321
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
4290
4322
|
? []
|
|
4291
4323
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
4292
|
-
return (index.h(index.Host, { key: '
|
|
4324
|
+
return (index.h(index.Host, { key: '95d3cea67d17f1aab33e7bc054161760e6d6df54' }, index.h("div", { key: 'b6cbdf841ab4ba64d2ccbf49fc6caf9ef082c7ee', class: "hidden" }, index.h("slot", { key: '18dde7efeec5c1bc38a044a683910db41f70e22d' })), index.h("slot", { key: 'd3ffb496e938ee3c91c5a7422357cbee90100d84', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: '0ab19e6c1c585d4e77004ec9238dba3baff83614', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: '76722d31da818102347278c7b62a93deaa9c29a1', 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
|
|
4293
4325
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
4294
4326
|
return this.getHeaderCell(header);
|
|
4295
4327
|
}))))
|
|
@@ -4300,7 +4332,7 @@ const NvDatagrid = class {
|
|
|
4300
4332
|
return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
4301
4333
|
})));
|
|
4302
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 &&
|
|
4303
|
-
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: 'ee4cdbb4683a3da20154fd60580d694d8f78feb8', name: "after" })));
|
|
4304
4336
|
}
|
|
4305
4337
|
get el() { return index.getElement(this); }
|
|
4306
4338
|
static get watchers() { return {
|
|
@@ -4308,11 +4340,12 @@ const NvDatagrid = class {
|
|
|
4308
4340
|
"data": ["parseData"],
|
|
4309
4341
|
"parsedColumns": ["handleParsedChange"],
|
|
4310
4342
|
"parsedData": ["handleParsedChange"],
|
|
4311
|
-
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
|
|
4312
|
-
"paginationState": ["handlePaginationState"],
|
|
4313
|
-
"
|
|
4343
|
+
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm", "handleInternalStateChange"],
|
|
4344
|
+
"paginationState": ["handlePaginationState", "handleInternalStateChange"],
|
|
4345
|
+
"sortingState": ["handleSortingState", "handleInternalStateChange"],
|
|
4314
4346
|
"pageSize": ["handlePageSize"],
|
|
4315
|
-
"rowSelectionState": ["handleRowSelectionState"]
|
|
4347
|
+
"rowSelectionState": ["handleRowSelectionState"],
|
|
4348
|
+
"state": ["handleStateChange"]
|
|
4316
4349
|
}; }
|
|
4317
4350
|
};
|
|
4318
4351
|
NvDatagrid.style = NvDatagridStyle0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.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');
|
package/dist/cjs/{nv-fielddaterange.entry-C14o96dd.js → nv-fielddaterange.entry-D6QmyWHp.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var inputmaskEdcad3c1 = require('./inputmask-edcad3c1-B9Omti4z.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -420,18 +420,41 @@ const NvFielddaterange = class {
|
|
|
420
420
|
// Use the unified parsing method instead of JSON.parse
|
|
421
421
|
this.parseUnifiedValue(newValue);
|
|
422
422
|
}
|
|
423
|
+
onOpenChanged(newValue) {
|
|
424
|
+
if (this.contentRef) {
|
|
425
|
+
if (newValue) {
|
|
426
|
+
this.contentRef.style.transition = 'none';
|
|
427
|
+
this.contentRef.style.maxHeight = '0px';
|
|
428
|
+
requestAnimationFrame(() => {
|
|
429
|
+
this.contentRef.style.transition =
|
|
430
|
+
'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';
|
|
431
|
+
this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
this.contentRef.style.transition = 'none';
|
|
436
|
+
this.contentRef.style.maxHeight = this.contentRef.scrollHeight + 'px';
|
|
437
|
+
requestAnimationFrame(() => {
|
|
438
|
+
this.contentRef.style.transition =
|
|
439
|
+
'max-height 0.18s cubic-bezier(0.4,0,0.2,1)';
|
|
440
|
+
this.contentRef.style.maxHeight = '0px';
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
423
445
|
//#endregion EVENTS
|
|
424
446
|
/****************************************************************************/
|
|
425
447
|
//#region RENDER
|
|
426
448
|
render() {
|
|
427
|
-
return (index.h(index.Host, { key: '
|
|
428
|
-
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '
|
|
429
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
430
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
449
|
+
return (index.h(index.Host, { key: '5f3b1fe7aee232ce13bbff470db257f723aef978' }, ((this.label && this.label.length > 0) ||
|
|
450
|
+
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '663fac675ac0fc443fd7e671d793bdfcb9f52d46', htmlFor: this.startInputId }, index.h("slot", { key: 'afdd8f49f12d5f3b476dee59b9a38439ff9215c5', name: "label" }, this.label))), index.h("nv-popover", { key: '1b6cb3b7dcabf572d580594fcf7d695b6d6ee66f', ref: el => (this.popoverElement = el), id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: 'd363e153e04eb0af7eeefef57dff6973a06f646d', slot: "trigger", class: "input-wrapper" }, index.h("slot", { key: '5e638ea73f83fb096a9581d3ef8bc11616e19acb', name: "before-input" }), index.h("div", { key: '6dcde890ca01b12a512f3e42eb7de2acc43562ee', class: "input-container" }, index.h("slot", { key: 'ce6acc334efc528965d7e957b6c5d3c48a0ee7d4', name: "leading-input" }), index.h("div", { key: '301b88ba035cc5ebe5ccb7a50a81391dcdf9c212', class: "range-inputs" }, index.h("input", { key: '385554f08afb6d0f3c276fa446edb7d01d756d5d', id: this.startInputId, type: "text", placeholder: this.startPlaceholder, name: this.startName, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.startValue, onInput: this.handleStartInput, onFocus: this.handleFocus, "data-scope": "date-range" }), index.h("svg", { key: 'f8c024bc6e933575dce8cc21213dbe719ffece28', xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "icon icon-tabler icons-tabler-outline icon-tabler-arrows-move-horizontal" }, index.h("path", { key: '0c942f98b933530f9a98f40d201cd4004781070d', stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), index.h("path", { key: '6b719ff53b0f8ded007954d110a26df367de8d76', d: "M18 9l3 3l-3 3" }), index.h("path", { key: 'dbc9d98a1123f2516e125fe368422059ee9de216', d: "M15 12h6" }), index.h("path", { key: 'bb450d42a867c08ba586de71750d3142576756fa', d: "M6 9l-3 3l3 3" }), index.h("path", { key: 'aced7f97e1d65c069a0831fc1fb41de0e5f14216', d: "M3 12h6" })), index.h("input", { key: 'a6182dd71ba14944918aef3c69c1ac81ecba3892', id: this.endInputId, type: "text", placeholder: this.endPlaceholder, name: this.endName, disabled: this.disabled, readOnly: this.readonly, required: this.required, value: this.endValue, onInput: this.handleEndInput, onFocus: this.handleFocus, "data-scope": "date-range" })), this.error && (index.h("nv-icon", { key: '4470222fe55588e441d3a41cfbcec0655616f1d6', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '5a6565f2c6fb8a4148f87ecbad54da0bb7ae1acc', name: "circle-check", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: '229ef4753a605ac0b7241d92f6157367d86dbd92', class: "toggle-calendar-icon", name: "calendar", size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '15de0c662d97751a16ea994f2c5678fa5bb333c0', name: "after-input" })), index.h("div", { key: 'cc165993c4033b5536649001cf2f8989ef9b41ef', slot: "content" }, index.h("nv-calendar", { key: '0a7c76e9a16504431ea0428278c940b9e97e7117', ref: el => (this.calendarElement = el), dateFormat: this.dateFormat, value: this.value, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, selectionType: "range", "data-prevent-navigation": "true" }))), ((this.description && this.description.length > 0) ||
|
|
451
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '2c7164560b8d59abca3759ae3db06bd3820fd897', class: "description" }, index.h("slot", { key: 'b84ed04584a0e4a4e33682503c588d70e5cc5735', name: "description" }, this.description))), (this.errorDescription ||
|
|
452
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '09aee3d407a9b126ca85ec82306430b4cb6ce71d', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (index.h("slot", { name: "error-description" })) : (this.errorDescription))), index.h("slot", { key: 'aa03e8616062be05d9947fa697016483bdfd9fdc' })));
|
|
431
453
|
}
|
|
432
454
|
get el() { return index.getElement(this); }
|
|
433
455
|
static get watchers() { return {
|
|
434
|
-
"value": ["handleValueChange"]
|
|
456
|
+
"value": ["handleValueChange"],
|
|
457
|
+
"open": ["onOpenChanged"]
|
|
435
458
|
}; }
|
|
436
459
|
};
|
|
437
460
|
NvFielddaterange.style = NvFielddaterangeStyle0;
|
package/dist/cjs/{nv-fielddropdownitem.entry-D4G4Ytus.js → nv-fielddropdownitem.entry-BbJ9SKGo.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
require('react');
|
|
5
5
|
|
|
6
6
|
const nvFielddropdownitemCss = "nv-fielddropdownitem{display:flex;gap:var(--spacing-2);flex-wrap:wrap;align-items:center;width:100%;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);font-weight:var(--menu-contextual-item-font-weight);font-size:var(--list-dropdown-font-size);line-height:var(--list-dropdown-line-height);color:var(--components-list-dropdown-item-label-default);border-radius:var(--list-dropdown-item-radius);transition:background-color 150ms ease-out, color 150ms ease-out;cursor:pointer}nv-fielddropdownitem:hover,nv-fielddropdownitem:focus,nv-fielddropdownitem:focus-within{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-fielddropdownitem[disabled]:not([disabled=false]){cursor:not-allowed;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}nv-fielddropdownitem .text-wrapper{display:flex;flex-grow:1;align-items:center;justify-content:space-between}nv-fielddropdownitem [data-scope=text]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nv-fielddropdownitem nv-icon[data-scope=selected]{color:var(--components-list-dropdown-item-label-default);align-self:center;margin-left:auto}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
5
|
require('react');
|
|
6
6
|
|
|
@@ -115,9 +115,9 @@ const NvFieldnumber = class {
|
|
|
115
115
|
/****************************************************************************/
|
|
116
116
|
//#region RENDER
|
|
117
117
|
render() {
|
|
118
|
-
return (index.h(index.Host, { key: '
|
|
119
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
120
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
118
|
+
return (index.h(index.Host, { key: 'bc6961e9cfb030f0ded61180836826bc67215432' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '98542b998a5db7572209167ccda6e143797efe02', htmlFor: this.inputId }, index.h("slot", { key: '59ee59722d9a05bc62307f12db55965b29ec5ac2', name: "label" }, this.label))), index.h("div", { key: 'dd63f77ae0110620d37d5e7d9e02baafd7384a18', class: "input-wrapper" }, index.h("slot", { key: '0c73ca84d755675012c82d0e963c619839551965', name: "before-input" }), index.h("div", { key: 'bcc8edc6ff5d2f57d1237f22de0d6b6d190ff8e3', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '6ae97f06dae32a6bf00bb73eddfe556ad2e92453', name: "leading-input" }), index.h("input", { key: '1799946e5b38ef77e3241a4ace04e37afdec98a4', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: this.required, max: this.max, min: this.min, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), index.h("slot", { key: 'b0861939aa926e51777caa62bf01ed6a0a39dc50', name: "trailing-input" }), this.error && (index.h("nv-icon", { key: '57df54aa50deab4ad077692cc4592561b31e0d42', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: 'e57297c4fab2826fb50943c47983f73eb3a8f5b0', name: "circle-check", class: "validation", size: "md" })), index.h("div", { key: '6096c2878876dd4324b112cf3067bfc3cf9d35f2', class: "stepper" }, index.h("nv-iconbutton", { key: '7e03c767f0f0c44f70435bfed2bae02f409ed23b', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), index.h("nv-iconbutton", { key: '06a5b8af32c99bab407ce427c4d634fb0209674c', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), index.h("slot", { key: '32dc74a736303088b40fff6b8dd53efb9c0e3832', name: "after-input" })), (this.description ||
|
|
119
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'c0cb59d63dfa4a16820ddf1b3438e287a4e94aaa', class: "description" }, index.h("slot", { key: 'bcb6d46402b596401ac7f9f01fb6cfb3e4b58feb', name: "description" }, this.description))), (this.errorDescription ||
|
|
120
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '093f05eadee4cf3802be34b98907596d64febcb6', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '93572b4f780e085a2be652a687e561275ebbc428', name: "error-description" }, this.errorDescription)))));
|
|
121
121
|
}
|
|
122
122
|
static get formAssociated() { return true; }
|
|
123
123
|
get el() { return index.getElement(this); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
5
|
require('react');
|
|
6
6
|
|
|
@@ -106,9 +106,9 @@ const NvFieldpassword = class {
|
|
|
106
106
|
/****************************************************************************/
|
|
107
107
|
//#region RENDER
|
|
108
108
|
render() {
|
|
109
|
-
return (index.h(index.Host, { key: '
|
|
110
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
111
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
109
|
+
return (index.h(index.Host, { key: 'fb277f244fb9f92e09cf77463c3a59b1a7a93095' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '84227c9b8844bcb02917e6f942c206758f2378b8', htmlFor: this.inputId }, index.h("slot", { key: '36331156c6823f96b017a18a4d134b3a0467e289', name: "label" }, this.label))), index.h("div", { key: 'babca6f3bf893084259917bfec7434a189bc6a88', class: "input-wrapper" }, index.h("slot", { key: '7ff461c1b36594cde5e2934b3c4aaa3eaafbea20', name: "before-input" }), index.h("div", { key: 'ac90041750bfdcc23245c42d7e6c52ae855b4bb5', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '0696566301e7fd935c0316b70b41f15cc68b2276', name: "leading-input" }), index.h("input", { key: '776db054e9b5fb46b592723fa6b0ad073e0cad93', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), (this.success || this.error) && (index.h("nv-icon", { key: '73d827ca041e3841b5159dd829769def664a5e8b', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (index.h("nv-iconbutton", { key: '7920164504e0834d8e8f0b91a51e4747cbaa0bfb', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), index.h("slot", { key: '4c651f834fe546cd75fc6f24ba37f35f3713c004', name: "after-input" })), (this.description ||
|
|
110
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '9db3be325ffe22ddaaaf6052d03b0eb5a8decc9f', class: "description" }, index.h("slot", { key: 'e262fafe3e0d3f1ffbf059eb80d0b0b2128f0c07', name: "description" }, this.description))), (this.errorDescription ||
|
|
111
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '28571af4f63bdf4a9d7ff558d0d672546765f188', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '9b3635bec4932601c0b265cfef7851ab48bad289', name: "error-description" }, this.errorDescription)))));
|
|
112
112
|
}
|
|
113
113
|
static get formAssociated() { return true; }
|
|
114
114
|
get el() { return index.getElement(this); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
@@ -87,9 +87,9 @@ const NvFieldradio = class {
|
|
|
87
87
|
/****************************************************************************/
|
|
88
88
|
//#region RENDER
|
|
89
89
|
render() {
|
|
90
|
-
return (index.h(index.Host, { key: '
|
|
91
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
92
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
90
|
+
return (index.h(index.Host, { key: '4533a498fbbf7edc20695ac8411dea11355c2bf9', class: clsx297c1ffe.clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, index.h("input", { key: '0ba25de106a4bb4a3ccf1c5ddf82e60966e59e9f', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), index.h("div", { key: 'c090a6746068f4ab8a8989d0117ec274320918a8', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '804bbd45628e20bcfce8005fd0abd6b8f5ecc677', htmlFor: this.inputId }, index.h("slot", { key: 'bfe774833365bf51bc1c1be47d960ce04cadaee3', name: "label" }, this.label))), (this.description ||
|
|
91
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '99245a0234557bb64887d6f499ffdd4a8b0a03b0', class: "description" }, index.h("slot", { key: '34bc5919f9bf80fee5a26b4d7dcbf4b2844ef202', name: "description" }, this.description))), (this.errorDescription ||
|
|
92
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'c67be256e429796853146da66aebe0f8ea80a131', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '241a84a4be6028850e42e96305413e8c3298acf3', name: "error-description" }, this.errorDescription))))));
|
|
93
93
|
}
|
|
94
94
|
static get formAssociated() { return true; }
|
|
95
95
|
get el() { return index.getElement(this); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
5
|
require('react');
|
|
6
6
|
|
|
@@ -347,13 +347,13 @@ const NvFieldselect = class {
|
|
|
347
347
|
* @returns {HTMLStencilElement} The HTML element to render.
|
|
348
348
|
*/
|
|
349
349
|
render() {
|
|
350
|
-
return (index.h(index.Host, { key: '
|
|
350
|
+
return (index.h(index.Host, { key: '3614f589d16ecfe4b7153a57d079b5bde8d14e4f' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'd3d222aeece0c0f99141adf9be19b3dfda5095ac', htmlFor: this.inputId }, index.h("slot", { key: 'd0deb950cdd7784878f2ee7d7e5a382c3aa67620', name: "label" }, this.label))), index.h("div", { key: '94b1ead9abf988d3a9a944f04c441054e0aeba1f', class: "select-wrapper" }, index.h("slot", { key: '5e018a64cd9556d67ecc2b9cfb48771f137c10a6', name: "before-input" }), index.h("div", { key: 'd52813fc9e534463b50da23b8a5a3e5d57aa2c3a', class: "select-container", onClick: this.handleSelectContainerClick }, index.h("slot", { key: 'dda40c57c5be6d10a20cb11cfa8eaa8398f84d6c', name: "leading-input" }), this.internalReadonly && (index.h("input", { key: '37b22a058b25867d7c4c5c7675288f7d4a368263', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
|
|
351
351
|
? `${this.inputId}-error`
|
|
352
|
-
: `${this.inputId}-description` })), index.h("select", { key: '
|
|
352
|
+
: `${this.inputId}-description` })), index.h("select", { key: '064eec6725beeba26cc5ded5fb21237b55d40cff', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: this.required, multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
353
353
|
? `${this.inputId}-error`
|
|
354
|
-
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (index.h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (index.h("slot", null))), index.h("div", { key: '
|
|
355
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
356
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
354
|
+
: `${this.inputId}-description` }, this.parsedOptions.length > 0 ? (this.parsedOptions.map(option => (index.h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (index.h("slot", null))), index.h("div", { key: '02e2e941e3d8efe4a1a5ef3e2cf95adcdaaa25e7', class: "select-icons" }, this.error && (index.h("nv-icon", { key: '481df68e62c2438db29aa3591180353f140d506d', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '2b7c05697786bb684f7be9aba49641d0bd4b17e2', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (index.h("nv-iconbutton", { key: 'ee340692540948b768ff8d7ad817879f1fa892c4', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), index.h("slot", { key: '9d638182d2f9808d6cf454d56c70cb7e45e520ab', name: "after-input" })), (this.description ||
|
|
355
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '0b5d93842494d99c7eeb5cde17bc266de14ebc79', class: "description", id: `${this.inputId}-description` }, index.h("slot", { key: '011365d39b5e18fda111f257461bedab1e4ddb5e', name: "description" }, this.description))), (this.errorDescription ||
|
|
356
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '15c238fe1651bab3cfe0088837b8f58beec52e28', class: "error-description", id: `${this.inputId}-error` }, index.h("slot", { key: 'edd7d6187957e34646cc270dcc1485f73d634e52', name: "error-description" }, this.errorDescription)))));
|
|
357
357
|
}
|
|
358
358
|
static get formAssociated() { return true; }
|
|
359
359
|
get el() { return index.getElement(this); }
|