@nova-design-system/nova-react 3.28.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/{constants-BReL3Lsa-DpB_ghPF.js → constants-gOKBmbgZ-CSoZ8z-G.js} +5 -0
- package/dist/cjs/generated/components.server.js +33 -1
- package/dist/cjs/index-DXwd3F_r.js +10391 -0
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/{nv-accordion-item.entry-fds_kk_3.js → nv-accordion-item.entry-CTbduehY.js} +3 -3
- package/dist/cjs/{nv-accordion.entry-BLs4N5ZL.js → nv-accordion.entry-DeaPwIUP.js} +2 -2
- package/dist/cjs/{nv-alert.entry-Bx1BiC8F.js → nv-alert.entry-B5k8RXXD.js} +8 -8
- package/dist/cjs/{nv-avatar.entry-DS88LME3.js → nv-avatar.entry-CJh9bGfN.js} +8 -8
- package/dist/cjs/{nv-badge_2.entry-vBPxmUmg.js → nv-badge_2.entry-BnPPW4rW.js} +8 -7
- package/dist/cjs/{nv-breadcrumb.entry-BOo3hA5y.js → nv-breadcrumb.entry-DS5GJVCJ.js} +2 -2
- package/dist/cjs/{nv-breadcrumbs.entry-igHC_6Bd.js → nv-breadcrumbs.entry-CJ835Ba8.js} +2 -2
- package/dist/cjs/{nv-button.entry-BRQPmQbs.js → nv-button.entry-8U0o_X3d.js} +7 -7
- package/dist/cjs/{nv-buttongroup.entry-D3tG2EZ1.js → nv-buttongroup.entry-D5I5d9y0.js} +2 -2
- package/dist/cjs/{nv-calendar.entry-BpNHMTKr.js → nv-calendar.entry-C0ggIM3A.js} +9 -9
- package/dist/cjs/{nv-col.entry-lyIZqDsW.js → nv-col.entry-tIk723nS.js} +2 -2
- package/dist/cjs/{nv-datagrid.entry-BeemONKu.js → nv-datagrid.entry-Cal_usTi.js} +8 -8
- package/dist/cjs/{nv-datagridcolumn.entry-B6kE4eVC.js → nv-datagridcolumn.entry-BLbpwW7Q.js} +2 -2
- package/dist/cjs/{nv-datetest.entry-C1uuC-ZG.js → nv-datetest.entry-NQzySOox.js} +2 -2
- package/dist/cjs/{nv-datetimetest.entry-Hthxbjj9.js → nv-datetimetest.entry-Br6j4eAR.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-Cr9zwMPo.js → nv-dialog.entry-GTDQJaoQ.js} +3 -3
- package/dist/cjs/{nv-dialogfooter_2.entry-DaaKojyE.js → nv-dialogfooter_2.entry-CHY36NHl.js} +10 -8
- package/dist/cjs/{nv-drawer.entry-0UaYxCjh.js → nv-drawer.entry-C-TZDi4-.js} +3 -3
- package/dist/cjs/{nv-drawerfooter_2.entry-CqtuC7xP.js → nv-drawerfooter_2.entry-DTY4qAnd.js} +8 -6
- package/dist/cjs/{nv-fieldcheckbox.entry-DK3aO8C8.js → nv-fieldcheckbox.entry-Qf4gdEnq.js} +5 -5
- package/dist/cjs/{nv-fielddate.entry-BY-xF3KN.js → nv-fielddate.entry-D1aJmKbh.js} +8 -8
- package/dist/cjs/{nv-fielddaterange.entry-BT6qCQc3.js → nv-fielddaterange.entry-Vc-gHwf8.js} +8 -8
- package/dist/cjs/{nv-fielddropdown.entry-CsVD067i.js → nv-fielddropdown.entry-BVVsM71m.js} +6 -6
- package/dist/cjs/{nv-fielddropdownitem.entry-Crtfwlx7.js → nv-fielddropdownitem.entry-DTRonCZJ.js} +2 -2
- package/dist/cjs/{nv-fieldmultiselect.entry-C2uoE60e.js → nv-fieldmultiselect.entry-Cvsh_jn7.js} +115 -86
- package/dist/cjs/{nv-fieldnumber.entry-DzW5SiiZ.js → nv-fieldnumber.entry-jVFZ0wj3.js} +6 -6
- package/dist/cjs/{nv-fieldpassword.entry-D4r9Qxos.js → nv-fieldpassword.entry-CQKbWqMe.js} +6 -6
- package/dist/cjs/{nv-fieldradio.entry-DX0Ghx--.js → nv-fieldradio.entry-FPGOqFBo.js} +4 -4
- package/dist/cjs/{nv-fieldselect.entry-_CglE66i.js → nv-fieldselect.entry-DJmW4pff.js} +7 -7
- package/dist/cjs/{nv-fieldslider.entry-6zt75uDU.js → nv-fieldslider.entry-D71HjSto.js} +4 -4
- package/dist/cjs/{nv-fieldtext.entry-B4X110wn.js → nv-fieldtext.entry-BxgbvxEW.js} +6 -6
- package/dist/cjs/{nv-fieldtextarea.entry-CeAMhA8Y.js → nv-fieldtextarea.entry-BDS37zhJ.js} +5 -5
- package/dist/cjs/{nv-fieldtime.entry-BvzncwNd.js → nv-fieldtime.entry-DkWokxdT.js} +55 -52
- package/dist/cjs/{nv-icon.entry-C2md2kmq.js → nv-icon.entry-CUemAv89.js} +8 -8
- package/dist/cjs/{nv-iconbutton_2.entry-D-zRpLjT.js → nv-iconbutton_2.entry-BLdJr3QV.js} +3 -3
- package/dist/cjs/{nv-menu.entry-DN_DkosX.js → nv-menu.entry-z4cDNCeX.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-Cj6w33rq.js → nv-menuitem.entry-4XdONuGl.js} +2 -2
- package/dist/cjs/{nv-notification-bullet.entry-DagStJ3K.js → nv-notification-bullet.entry-B1EK4G_X.js} +1 -1
- package/dist/cjs/{nv-notification.entry-oV69FpxE.js → nv-notification.entry-BBAQ72f7.js} +19 -19
- package/dist/cjs/{nv-notificationcontainer.entry-gQGHHeer.js → nv-notificationcontainer.entry-CtFunFA9.js} +2 -2
- package/dist/cjs/{nv-pagination-nav.entry-BYvcVj1M.js → nv-pagination-nav.entry-DbzEBjoa.js} +2 -2
- package/dist/cjs/{nv-paginationtable.entry-CwCFQwbl.js → nv-paginationtable.entry-DRGsk0DH.js} +19 -3
- package/dist/cjs/{nv-popover.entry-DySToeSB.js → nv-popover.entry-w9o3Y_vT.js} +2 -2
- package/dist/cjs/{nv-row.entry-46ghuEeG.js → nv-row.entry-Cop4QB1Y.js} +2 -2
- package/dist/cjs/nv-sidebar.entry-96HyTMt9.js +355 -0
- package/dist/cjs/{nv-sidebarcontent.entry-Pb8c2QoA.js → nv-sidebarcontent.entry-RCkZZp9I.js} +2 -2
- package/dist/cjs/{nv-sidebardivider.entry-LCCO53Z5.js → nv-sidebardivider.entry-DY25WqI7.js} +2 -2
- package/dist/cjs/{nv-sidebarfooter.entry-DG5fkLHd.js → nv-sidebarfooter.entry-9BFpNPLP.js} +2 -2
- package/dist/cjs/{nv-sidebargroup.entry-DRqkSyQi.js → nv-sidebargroup.entry-Cj52DXba.js} +2 -2
- package/dist/cjs/{nv-sidebarheader.entry-D6WvH2wG.js → nv-sidebarheader.entry-_WZgNwoi.js} +2 -2
- package/dist/cjs/{nv-sidebarlogo.entry-BorScwI-.js → nv-sidebarlogo.entry-4Zy6k3V5.js} +2 -2
- package/dist/cjs/{nv-sidebarnavitem.entry-BEW74Rw3.js → nv-sidebarnavitem.entry-fQ9sqxDj.js} +3 -3
- package/dist/cjs/{nv-sidebarnavsubitem.entry-EgaIlUfP.js → nv-sidebarnavsubitem.entry-1iBobkME.js} +2 -2
- package/dist/cjs/{nv-split.entry-CEC5Tuwz.js → nv-split.entry-Dfzpge0r.js} +2 -2
- package/dist/cjs/{nv-stack.entry-BR8lYaoI.js → nv-stack.entry-BnCput1S.js} +2 -2
- package/dist/cjs/nv-statusindicator.entry-ClPHcTkz.js +42 -0
- package/dist/cjs/{nv-table.entry-CISZFst5.js → nv-table.entry-DsllD6Bz.js} +3 -3
- package/dist/cjs/{nv-tableheader.entry-DbdpTJGC.js → nv-tableheader.entry-AWCKrpLj.js} +2 -2
- package/dist/cjs/nv-tag.entry-BwENpoSV.js +85 -0
- package/dist/cjs/{nv-timetest.entry-Dg1JEgAv.js → nv-timetest.entry-BQsV7Qb2.js} +2 -2
- package/dist/cjs/{nv-toggle.entry-DDfRpC1R.js → nv-toggle.entry-a0tSJ6GE.js} +3 -3
- package/dist/cjs/{nv-togglebutton.entry-D7NkdIXP.js → nv-togglebutton.entry-CT8fZr74.js} +2 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-L8gitSUS.js → nv-togglebuttongroup.entry-BN7WkQ_L.js} +2 -2
- package/dist/cjs/{nv-tooltip.entry-BElnrEqE.js → nv-tooltip.entry-xpFqRgZM.js} +2 -2
- package/dist/components/NvDatatable/NvDatatable.js +294 -88
- package/dist/components/NvDatatable/expandState.js +8 -0
- package/dist/components/NvDatatable/expandState.test.js +41 -0
- package/dist/components/NvDatatable/paginationState.js +9 -0
- package/dist/components/NvDatatable/paginationState.test.js +84 -0
- package/dist/generated/components.js +20 -1
- package/dist/generated/components.server.js +31 -1
- package/dist/types/components/NvDatatable/NvDatatable.d.ts +1 -1
- package/dist/types/components/NvDatatable/expandState.d.ts +5 -0
- package/dist/types/components/NvDatatable/expandState.test.d.ts +1 -0
- package/dist/types/components/NvDatatable/paginationState.d.ts +9 -0
- package/dist/types/components/NvDatatable/paginationState.test.d.ts +1 -0
- package/dist/types/components/NvDatatable/types.d.ts +21 -1
- package/dist/types/generated/components.d.ts +12 -1
- package/dist/types/generated/components.server.d.ts +12 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/providers/NotificationProvider.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/index-Kxp9mv-Q.js +0 -10119
- package/dist/cjs/nv-sidebar.entry-B6opNG2r.js +0 -181
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
|
+
var constantsGOKBmbgZ = require('./constants-gOKBmbgZ-CSoZ8z-G.js');
|
|
5
5
|
var v4BdYh22OP = require('./v4-BdYh22OP-C1vaJ4yP.js');
|
|
6
6
|
require('@stencil/react-output-target/runtime');
|
|
7
7
|
require('react');
|
|
@@ -13,37 +13,37 @@ require('react-dom');
|
|
|
13
13
|
const FORMAT_CONFIGS = {
|
|
14
14
|
'HH': {
|
|
15
15
|
pattern: /^([0-1]?[0-9]|2[0-3])$/,
|
|
16
|
-
parts: [
|
|
16
|
+
parts: [constantsGOKBmbgZ.TimeType.Hours],
|
|
17
17
|
defaultValue: '00',
|
|
18
18
|
maxLength: 2,
|
|
19
19
|
},
|
|
20
20
|
'HH:mm': {
|
|
21
21
|
pattern: /^([0-1]?[0-9]|2[0-3]):([0-5]?[0-9])$/,
|
|
22
|
-
parts: [
|
|
22
|
+
parts: [constantsGOKBmbgZ.TimeType.Hours, constantsGOKBmbgZ.TimeType.Minutes],
|
|
23
23
|
defaultValue: '00:00',
|
|
24
24
|
maxLength: 5,
|
|
25
25
|
},
|
|
26
26
|
'HH:mm:ss': {
|
|
27
27
|
pattern: /^([0-1]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])$/,
|
|
28
|
-
parts: [
|
|
28
|
+
parts: [constantsGOKBmbgZ.TimeType.Hours, constantsGOKBmbgZ.TimeType.Minutes, constantsGOKBmbgZ.TimeType.Seconds],
|
|
29
29
|
defaultValue: '00:00:00',
|
|
30
30
|
maxLength: 8,
|
|
31
31
|
},
|
|
32
32
|
'hh': {
|
|
33
33
|
pattern: /^(0?[1-9]|1[0-2])$/,
|
|
34
|
-
parts: [
|
|
34
|
+
parts: [constantsGOKBmbgZ.TimeType.Hours],
|
|
35
35
|
defaultValue: '01',
|
|
36
36
|
maxLength: 2,
|
|
37
37
|
},
|
|
38
38
|
'hh:mm': {
|
|
39
39
|
pattern: /^(0?[1-9]|1[0-2]):([0-5]?[0-9])$/,
|
|
40
|
-
parts: [
|
|
40
|
+
parts: [constantsGOKBmbgZ.TimeType.Hours, constantsGOKBmbgZ.TimeType.Minutes],
|
|
41
41
|
defaultValue: '01:00',
|
|
42
42
|
maxLength: 5,
|
|
43
43
|
},
|
|
44
44
|
'hh:mm:ss': {
|
|
45
45
|
pattern: /^(0?[1-9]|1[0-2]):([0-5]?[0-9]):([0-5]?[0-9])$/,
|
|
46
|
-
parts: [
|
|
46
|
+
parts: [constantsGOKBmbgZ.TimeType.Hours, constantsGOKBmbgZ.TimeType.Minutes, constantsGOKBmbgZ.TimeType.Seconds],
|
|
47
47
|
defaultValue: '01:00:00',
|
|
48
48
|
maxLength: 8,
|
|
49
49
|
},
|
|
@@ -57,7 +57,7 @@ function getVisibleTimeTypes(format) {
|
|
|
57
57
|
const config = FORMAT_CONFIGS[format];
|
|
58
58
|
if (!config) {
|
|
59
59
|
// Fallback for unknown formats
|
|
60
|
-
return [
|
|
60
|
+
return [constantsGOKBmbgZ.TimeType.Hours, constantsGOKBmbgZ.TimeType.Minutes, constantsGOKBmbgZ.TimeType.Seconds];
|
|
61
61
|
}
|
|
62
62
|
return config.parts;
|
|
63
63
|
}
|
|
@@ -138,7 +138,7 @@ function parseValueByFormat(value, format) {
|
|
|
138
138
|
}
|
|
139
139
|
if (parts.length >= 2 &&
|
|
140
140
|
parts[1] &&
|
|
141
|
-
config.parts.includes(
|
|
141
|
+
config.parts.includes(constantsGOKBmbgZ.TimeType.Minutes)) {
|
|
142
142
|
const minutes = parseInt(parts[1], 10);
|
|
143
143
|
if (!isNaN(minutes) && minutes >= 0 && minutes <= 59) {
|
|
144
144
|
result.minutes = minutes.toString().padStart(2, '0');
|
|
@@ -146,7 +146,7 @@ function parseValueByFormat(value, format) {
|
|
|
146
146
|
}
|
|
147
147
|
if (parts.length >= 3 &&
|
|
148
148
|
parts[2] &&
|
|
149
|
-
config.parts.includes(
|
|
149
|
+
config.parts.includes(constantsGOKBmbgZ.TimeType.Seconds)) {
|
|
150
150
|
const seconds = parseInt(parts[2], 10);
|
|
151
151
|
if (!isNaN(seconds) && seconds >= 0 && seconds <= 59) {
|
|
152
152
|
result.seconds = seconds.toString().padStart(2, '0');
|
|
@@ -190,7 +190,7 @@ function extractRelevantComponents(components, format) {
|
|
|
190
190
|
minutes: '00',
|
|
191
191
|
seconds: '00',
|
|
192
192
|
};
|
|
193
|
-
if (config.parts.includes(
|
|
193
|
+
if (config.parts.includes(constantsGOKBmbgZ.TimeType.Hours)) {
|
|
194
194
|
// Validate hours for the target format
|
|
195
195
|
const hours = parseInt(components.hours, 10);
|
|
196
196
|
if (format.startsWith('hh')) {
|
|
@@ -208,10 +208,10 @@ function extractRelevantComponents(components, format) {
|
|
|
208
208
|
// If invalid, keep the default '00'
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
if (config.parts.includes(
|
|
211
|
+
if (config.parts.includes(constantsGOKBmbgZ.TimeType.Minutes)) {
|
|
212
212
|
result.minutes = components.minutes;
|
|
213
213
|
}
|
|
214
|
-
if (config.parts.includes(
|
|
214
|
+
if (config.parts.includes(constantsGOKBmbgZ.TimeType.Seconds)) {
|
|
215
215
|
result.seconds = components.seconds;
|
|
216
216
|
}
|
|
217
217
|
return result;
|
|
@@ -242,7 +242,7 @@ function reconstructTimeByFormat(components, format) {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
const nvFieldtimeCss = () => `nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldtime{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldtime[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtime[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldtime[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtime[required]:not([required=false]) label::after,nv-fieldtime[aria-required=true] label::after{content:"*";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldtime label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;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(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldtime nv-popover{width:100%;display:block}nv-fieldtime nv-popover [data-scope=popover]{padding:var(--list-dropdown-padding);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:100%}nv-fieldtime nv-popover{z-index:9999}nv-fieldtime .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldtime .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtime .input-container:focus-within,nv-fieldtime .input-container:focus-within:hover,nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtime .input-container:has(input:read-only){background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtime .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtime .input-container{display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%;min-height:40px;gap:0;padding-left:var(--form-field-padding-x)}nv-fieldtime .input-container input.time-input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%}nv-fieldtime .input-container input.time-input:focus{outline:none}nv-fieldtime .input-container input.time-input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input{}nv-fieldtime .input-container input.time-input[type=password]::-ms-clear,nv-fieldtime .input-container input.time-input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldtime .input-container input.time-input{width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}nv-fieldtime .input-container input.time-input::-webkit-inner-spin-button,nv-fieldtime .input-container input.time-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}nv-fieldtime .input-container span{width:100%;text-align:center;min-width:24px;flex:0 0 24px;padding:0 4px;color:var(--components-form-field-content-text)}nv-fieldtime .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldtime .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldtime .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fieldtime .input-container>nv-iconbutton{margin-left:auto}nv-fieldtime .input-container nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px;top:50%;transform:translateY(-50%)}nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus-within{border-color:var(--color-focus-brand);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand)}nv-fieldtime .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);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;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);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;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldtime hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}nv-fieldtime .time-dropdown{width:100%}nv-fieldtime .time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column{flex:1;text-align:center}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar{width:6px;height:6px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column{max-height:200px;overflow-y:auto;scroll-behavior:smooth;scrollbar-gutter:stable both-edges;scrollbar-gutter:auto}nv-fieldtime .time-dropdown .time-columns .time-column:last-child{border-right:none}nv-fieldtime .time-dropdown .time-columns .time-column .time-option{padding:var(--calendar-padding);text-align:center;cursor:pointer;transition:background-color 0.2s;border-radius:var(--list-dropdown-item-radius);color:var(--components-calendar-cell-text);font-size:var(--font-size-sm);display:flex;justify-content:center;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus,nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-calendar-cell-background-hover);color:var(--components-menu-contextual-item-content-hover)}`;
|
|
245
|
+
const nvFieldtimeCss = () => `nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldtime{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldtime[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtime[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldtime[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtime[required]:not([required=false]) label::after,nv-fieldtime[aria-required=true] label::after{content:"*";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldtime label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;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(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldtime nv-popover{width:100%;display:block}nv-fieldtime nv-popover [data-scope=popover]{padding:var(--list-dropdown-padding);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:100%}nv-fieldtime nv-popover{z-index:9999}nv-fieldtime .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fieldtime .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldtime .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtime .input-container:focus-within,nv-fieldtime .input-container:focus-within:hover,nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtime .input-container:has(input:read-only){background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtime .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtime .input-container{display:flex;justify-content:flex-start;align-items:center;position:relative;width:100%;min-height:40px;gap:0;padding-left:var(--form-field-padding-x)}nv-fieldtime .input-container input.time-input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%}nv-fieldtime .input-container input.time-input:focus{outline:none}nv-fieldtime .input-container input.time-input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldtime .input-container input.time-input{}nv-fieldtime .input-container input.time-input[type=password]::-ms-clear,nv-fieldtime .input-container input.time-input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldtime .input-container input.time-input{width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}nv-fieldtime .input-container input.time-input::-webkit-inner-spin-button,nv-fieldtime .input-container input.time-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}nv-fieldtime .input-container span{width:100%;text-align:center;min-width:24px;flex:0 0 24px;padding:0 4px;color:var(--components-form-field-content-text)}nv-fieldtime .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldtime .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldtime .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fieldtime .input-container>nv-iconbutton{margin-left:auto}nv-fieldtime .input-container nv-icon.validation{color:var(--nv-field-border-default);position:absolute;right:50px;top:50%;transform:translateY(-50%)}nv-fieldtime .input-container:focus,nv-fieldtime .input-container:focus-within{border-color:var(--color-focus-brand);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--color-focus-brand)}nv-fieldtime .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);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;line-height:var(--form-description-line-height)}nv-fieldtime .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);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;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldtime .error-description[hidden]{display:none}nv-fieldtime hr{border:none;border-top:1px solid var(--dropdown-divider-color, #ccc);margin:0.5rem 0}nv-fieldtime .time-dropdown{width:100%}nv-fieldtime .time-dropdown .time-columns{display:flex;justify-content:flex-start;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column{flex:1;text-align:center}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar{width:6px;height:6px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fieldtime .time-dropdown .time-columns .time-column{max-height:200px;overflow-y:auto;scroll-behavior:smooth;scrollbar-gutter:stable both-edges;scrollbar-gutter:auto}nv-fieldtime .time-dropdown .time-columns .time-column:last-child{border-right:none}nv-fieldtime .time-dropdown .time-columns .time-column .time-option{padding:var(--calendar-padding);text-align:center;cursor:pointer;transition:background-color 0.2s;border-radius:var(--list-dropdown-item-radius);color:var(--components-calendar-cell-text);font-size:var(--font-size-sm);display:flex;justify-content:center;align-items:center}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:hover{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus,nv-fieldtime .time-dropdown .time-columns .time-column .time-option:focus-within{background-color:var(--components-calendar-cell-background-hover);color:var(--components-calendar-cell-text-hover)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.selected{background-color:var(--components-calendar-cell-background-selected);color:var(--components-calendar-cell-text-selected)}nv-fieldtime .time-dropdown .time-columns .time-column .time-option.highlighted{background-color:var(--components-calendar-cell-background-hover);color:var(--components-menu-contextual-item-content-hover)}`;
|
|
246
246
|
|
|
247
247
|
const NvFieldtime = class {
|
|
248
248
|
constructor(hostRef) {
|
|
@@ -251,7 +251,7 @@ const NvFieldtime = class {
|
|
|
251
251
|
// Input elements for hours, minutes, and seconds
|
|
252
252
|
this.inputElements = {};
|
|
253
253
|
this.inputZeroAdded = {};
|
|
254
|
-
this.typeFocused =
|
|
254
|
+
this.typeFocused = constantsGOKBmbgZ.TimeType.Hours;
|
|
255
255
|
/****************************************************************************/
|
|
256
256
|
//#region STATES
|
|
257
257
|
this.hours = '00';
|
|
@@ -395,29 +395,30 @@ const NvFieldtime = class {
|
|
|
395
395
|
/****************************************************************************/
|
|
396
396
|
//#region WATCHERS
|
|
397
397
|
handleValueChange(newValue) {
|
|
398
|
-
// Parse the new value and
|
|
398
|
+
// Parse the new value and update internal state (hours, minutes, seconds)
|
|
399
|
+
// so the input fields reflect the new value
|
|
399
400
|
if (newValue) {
|
|
400
401
|
const components = parseValueByFormat(newValue, this.format);
|
|
401
402
|
const formattedValue = reconstructTimeByFormat(components, this.format);
|
|
402
|
-
//
|
|
403
|
-
|
|
403
|
+
// Update internal state from parsed components
|
|
404
|
+
this.hours = components.hours;
|
|
405
|
+
this.minutes = components.minutes;
|
|
406
|
+
this.seconds = components.seconds;
|
|
407
|
+
// Ensure format consistency by correcting the value if needed
|
|
404
408
|
if (formattedValue !== newValue) {
|
|
405
409
|
this.value = formattedValue;
|
|
406
|
-
return; // The watcher will be called again with the formatted value
|
|
407
410
|
}
|
|
408
411
|
}
|
|
409
|
-
// Emit the value in the correct format
|
|
410
|
-
this.valueChanged.emit(newValue);
|
|
411
412
|
}
|
|
412
413
|
handleOpenChange(newOpen) {
|
|
413
414
|
// React to external changes, e.g., highlight current time on open
|
|
414
415
|
if (newOpen) {
|
|
415
416
|
// Re-highlight columns based on current value
|
|
416
|
-
const hourSelector = `.time-column.time-column-${
|
|
417
|
+
const hourSelector = `.time-column.time-column-${constantsGOKBmbgZ.TimeType.Hours} div`;
|
|
417
418
|
this.updateColumnHighlight(hourSelector, this.hours);
|
|
418
|
-
const minutesSelector = `.time-column.time-column-${
|
|
419
|
+
const minutesSelector = `.time-column.time-column-${constantsGOKBmbgZ.TimeType.Minutes} div`;
|
|
419
420
|
this.updateColumnHighlight(minutesSelector, this.minutes);
|
|
420
|
-
const secondsSelector = `.time-column.time-column-${
|
|
421
|
+
const secondsSelector = `.time-column.time-column-${constantsGOKBmbgZ.TimeType.Seconds} div`;
|
|
421
422
|
this.updateColumnHighlight(secondsSelector, this.seconds);
|
|
422
423
|
}
|
|
423
424
|
}
|
|
@@ -453,20 +454,21 @@ const NvFieldtime = class {
|
|
|
453
454
|
}
|
|
454
455
|
// Update the time value based on the type
|
|
455
456
|
switch (type) {
|
|
456
|
-
case
|
|
457
|
+
case constantsGOKBmbgZ.TimeType.Hours:
|
|
457
458
|
this.handleHoursChange(inputValue, type);
|
|
458
459
|
break;
|
|
459
|
-
case
|
|
460
|
+
case constantsGOKBmbgZ.TimeType.Minutes:
|
|
460
461
|
this.handleMinutesChange(inputValue, type);
|
|
461
462
|
break;
|
|
462
|
-
case
|
|
463
|
+
case constantsGOKBmbgZ.TimeType.Seconds:
|
|
463
464
|
this.handleSecondsChange(inputValue, type);
|
|
464
465
|
break;
|
|
465
466
|
}
|
|
466
467
|
// Reconstruct time from inputs in the correct format
|
|
467
468
|
const reconstructedValue = this.reconstructTime();
|
|
468
|
-
// Update the value
|
|
469
|
+
// Update the value and emit the event
|
|
469
470
|
this.value = reconstructedValue;
|
|
471
|
+
this.valueChanged.emit(this.value);
|
|
470
472
|
}
|
|
471
473
|
handleHoursChange(inputValue, type) {
|
|
472
474
|
const isHHFormat = this.format.startsWith('HH');
|
|
@@ -525,7 +527,7 @@ const NvFieldtime = class {
|
|
|
525
527
|
// Auto-navigation to next field when input is complete
|
|
526
528
|
if (this.hours.length >= 1 && !this.inputZeroAdded[type]) {
|
|
527
529
|
const visibleTypes = getVisibleTimeTypes(this.format);
|
|
528
|
-
const currentTypeIndex = visibleTypes.indexOf(
|
|
530
|
+
const currentTypeIndex = visibleTypes.indexOf(constantsGOKBmbgZ.TimeType.Hours);
|
|
529
531
|
const nextTypeIndex = currentTypeIndex + 1;
|
|
530
532
|
if (nextTypeIndex < visibleTypes.length) {
|
|
531
533
|
const nextType = visibleTypes[nextTypeIndex];
|
|
@@ -590,7 +592,7 @@ const NvFieldtime = class {
|
|
|
590
592
|
// Auto-navigation to next field when input is complete
|
|
591
593
|
if (this.minutes.length >= 1 && !this.inputZeroAdded[type]) {
|
|
592
594
|
const visibleTypes = getVisibleTimeTypes(this.format);
|
|
593
|
-
const currentTypeIndex = visibleTypes.indexOf(
|
|
595
|
+
const currentTypeIndex = visibleTypes.indexOf(constantsGOKBmbgZ.TimeType.Minutes);
|
|
594
596
|
const nextTypeIndex = currentTypeIndex + 1;
|
|
595
597
|
if (nextTypeIndex < visibleTypes.length) {
|
|
596
598
|
const nextType = visibleTypes[nextTypeIndex];
|
|
@@ -732,18 +734,19 @@ const NvFieldtime = class {
|
|
|
732
734
|
const option = parseInt(event.target.textContent || '0', 10);
|
|
733
735
|
// Update the time component directly without constraint validation
|
|
734
736
|
// Dropdown options are already filtered by constraints during generation
|
|
735
|
-
if (type ===
|
|
737
|
+
if (type === constantsGOKBmbgZ.TimeType.Hours) {
|
|
736
738
|
this.hours = option.toString().padStart(2, '0');
|
|
737
739
|
}
|
|
738
|
-
else if (type ===
|
|
740
|
+
else if (type === constantsGOKBmbgZ.TimeType.Minutes) {
|
|
739
741
|
this.minutes = option.toString().padStart(2, '0');
|
|
740
742
|
}
|
|
741
|
-
else if (type ===
|
|
743
|
+
else if (type === constantsGOKBmbgZ.TimeType.Seconds) {
|
|
742
744
|
this.seconds = option.toString().padStart(2, '0');
|
|
743
745
|
}
|
|
744
746
|
// Reconstruct time in the correct format and update value
|
|
745
747
|
const reconstructedTime = this.reconstructTime();
|
|
746
748
|
this.value = reconstructedTime;
|
|
749
|
+
this.valueChanged.emit(this.value);
|
|
747
750
|
}
|
|
748
751
|
handleInputBlur() {
|
|
749
752
|
// Use a delay to check if the focus is still within the popover
|
|
@@ -790,11 +793,11 @@ const NvFieldtime = class {
|
|
|
790
793
|
}
|
|
791
794
|
// Generate the time options based on the type
|
|
792
795
|
switch (type) {
|
|
793
|
-
case
|
|
796
|
+
case constantsGOKBmbgZ.TimeType.Hours:
|
|
794
797
|
return this.generateHourOptions(stepInSeconds);
|
|
795
|
-
case
|
|
798
|
+
case constantsGOKBmbgZ.TimeType.Minutes:
|
|
796
799
|
return this.generateMinuteOptions(stepInSeconds);
|
|
797
|
-
case
|
|
800
|
+
case constantsGOKBmbgZ.TimeType.Seconds:
|
|
798
801
|
return this.generateSecondOptions(stepInSeconds);
|
|
799
802
|
default:
|
|
800
803
|
return [];
|
|
@@ -1044,11 +1047,11 @@ const NvFieldtime = class {
|
|
|
1044
1047
|
renderTimeInputField(type) {
|
|
1045
1048
|
const getValue = () => {
|
|
1046
1049
|
switch (type) {
|
|
1047
|
-
case
|
|
1050
|
+
case constantsGOKBmbgZ.TimeType.Hours:
|
|
1048
1051
|
return this.hours;
|
|
1049
|
-
case
|
|
1052
|
+
case constantsGOKBmbgZ.TimeType.Minutes:
|
|
1050
1053
|
return this.minutes;
|
|
1051
|
-
case
|
|
1054
|
+
case constantsGOKBmbgZ.TimeType.Seconds:
|
|
1052
1055
|
return this.seconds;
|
|
1053
1056
|
default:
|
|
1054
1057
|
return '00';
|
|
@@ -1056,11 +1059,11 @@ const NvFieldtime = class {
|
|
|
1056
1059
|
};
|
|
1057
1060
|
const getPlaceholder = () => {
|
|
1058
1061
|
switch (type) {
|
|
1059
|
-
case
|
|
1062
|
+
case constantsGOKBmbgZ.TimeType.Hours:
|
|
1060
1063
|
return this.format.includes('hh') ? 'hh' : 'HH';
|
|
1061
|
-
case
|
|
1064
|
+
case constantsGOKBmbgZ.TimeType.Minutes:
|
|
1062
1065
|
return 'mm';
|
|
1063
|
-
case
|
|
1066
|
+
case constantsGOKBmbgZ.TimeType.Seconds:
|
|
1064
1067
|
return 'ss';
|
|
1065
1068
|
default:
|
|
1066
1069
|
return '';
|
|
@@ -1068,11 +1071,11 @@ const NvFieldtime = class {
|
|
|
1068
1071
|
};
|
|
1069
1072
|
const getId = () => {
|
|
1070
1073
|
switch (type) {
|
|
1071
|
-
case
|
|
1074
|
+
case constantsGOKBmbgZ.TimeType.Hours:
|
|
1072
1075
|
return this.inputId;
|
|
1073
|
-
case
|
|
1076
|
+
case constantsGOKBmbgZ.TimeType.Minutes:
|
|
1074
1077
|
return `${this.inputId}-minutes`;
|
|
1075
|
-
case
|
|
1078
|
+
case constantsGOKBmbgZ.TimeType.Seconds:
|
|
1076
1079
|
return `${this.inputId}-seconds`;
|
|
1077
1080
|
default:
|
|
1078
1081
|
return this.inputId;
|
|
@@ -1098,15 +1101,15 @@ const NvFieldtime = class {
|
|
|
1098
1101
|
RenderTimeOptionsColumn(type) {
|
|
1099
1102
|
return (index.h("div", { class: `time-column time-column-${type}`, onScroll: e => this.handleScroll(e, type) }, this.generateInfiniteTimeOptions(type).map((option, index$1) => (index.h("div", { class: {
|
|
1100
1103
|
'time-option': true,
|
|
1101
|
-
'selected': (type ===
|
|
1102
|
-
(type ===
|
|
1103
|
-
(type ===
|
|
1104
|
+
'selected': (type === constantsGOKBmbgZ.TimeType.Hours && option === this.hours) ||
|
|
1105
|
+
(type === constantsGOKBmbgZ.TimeType.Minutes && option === this.minutes) ||
|
|
1106
|
+
(type === constantsGOKBmbgZ.TimeType.Seconds && option === this.seconds),
|
|
1104
1107
|
}, key: `${option}-${index$1}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
1105
1108
|
}
|
|
1106
1109
|
render() {
|
|
1107
|
-
return (index.h(index.Host, { key: '
|
|
1108
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
1109
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
1110
|
+
return (index.h(index.Host, { key: 'a032b1f8f529f78197c0c392a36a2a7a0e64da9a', onclick: (e) => this.handleHostClick(e), "aria-expanded": this.open ? 'true' : 'false' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '2ad43d201ababc34f5f2e83f56e993b4f4308391', htmlFor: this.inputId }, index.h("slot", { key: '94c4ae7c844a21ca5f2eaa2944ae6fde8a743db1', name: "label" }, this.label))), index.h("nv-popover", { key: '2ffeb7b5cdd4bee7c16d749a8f9056aa0b3e0def', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open, onOpenChanged: this.handleOpenChanged }, index.h("div", { key: '493e8641008451f36d289e54061cfbf7041219a8', class: "input-wrapper", slot: "trigger" }, index.h("slot", { key: 'cc4dda576165ac75fa7c3e64c2688e74631adbe1', name: "before-input" }), index.h("div", { key: '589853e389e86ada62ee220bd7d383d53841a857', class: "input-container" }, index.h("slot", { key: 'a705e0d398d6a169ff98b04944baf0df13d02a3f', name: "leading-input" }), this.renderTimeInputFields(), index.h("nv-iconbutton", { key: 'a33b9ba6453d7649970040e690ee50bdfaa83ee3', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', onClick: () => this.HandleDropdownIconClick() }), this.error && (index.h("nv-icon", { key: '89890ac88e95199aedc13ea536843ba1c0e1cb18', name: "alert-circle", class: "validation", size: "sm" })), this.success && (index.h("nv-icon", { key: '2f020e2a5efb5ec37eecbe2629236fbbf4ca6ce8', name: "circle-check", class: "validation", size: "sm" }))), index.h("slot", { key: '2357690da2edc71f674f384b2d497155ef47984e', name: "after-input" })), index.h("div", { key: 'd13be0ad80be00d85b87eb7981e875d75a0e4862', class: "time-dropdown", slot: "content" }, index.h("div", { key: '1443d77eea765261a16bd3f838ed9f7126bf68a5', class: "time-columns" }, this.renderTimeDropdownColumns()))), (this.description ||
|
|
1111
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '4feca47ba72f1594a6a6c8246810620eda9d207b', class: "description" }, index.h("slot", { key: '43845e3b0f15f787ea69eb1a588e3bc6392449c1', name: "description" }, this.description))), (this.errorDescription ||
|
|
1112
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '539a080864dd94f4b7b1b1c2c16e813ca3d5e42d', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '9c70b3af02a3e3a26b022d65cced0217d14c8812', name: "error-description" }, this.errorDescription)))));
|
|
1110
1113
|
}
|
|
1111
1114
|
static get formAssociated() { return true; }
|
|
1112
1115
|
get el() { return index.getElement(this); }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
4
|
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
|
-
var
|
|
5
|
+
var constantsGOKBmbgZ = require('./constants-gOKBmbgZ-CSoZ8z-G.js');
|
|
6
6
|
require('@stencil/react-output-target/runtime');
|
|
7
7
|
require('react');
|
|
8
8
|
require('react-dom');
|
|
@@ -50,19 +50,19 @@ const NvIcon = class {
|
|
|
50
50
|
}
|
|
51
51
|
componentWillRender() {
|
|
52
52
|
if (this.xsmall) {
|
|
53
|
-
this.size =
|
|
53
|
+
this.size = constantsGOKBmbgZ.SemanticSizes.ExtraSmall;
|
|
54
54
|
}
|
|
55
55
|
if (this.small) {
|
|
56
|
-
this.size =
|
|
56
|
+
this.size = constantsGOKBmbgZ.SemanticSizes.Small;
|
|
57
57
|
}
|
|
58
58
|
if (this.medium) {
|
|
59
|
-
this.size =
|
|
59
|
+
this.size = constantsGOKBmbgZ.SemanticSizes.Medium;
|
|
60
60
|
}
|
|
61
61
|
if (this.large) {
|
|
62
|
-
this.size =
|
|
62
|
+
this.size = constantsGOKBmbgZ.SemanticSizes.Large;
|
|
63
63
|
}
|
|
64
64
|
if (this.xlarge) {
|
|
65
|
-
this.size =
|
|
65
|
+
this.size = constantsGOKBmbgZ.SemanticSizes.ExtraLarge;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
componentWillLoad() {
|
|
@@ -72,7 +72,7 @@ const NvIcon = class {
|
|
|
72
72
|
/****************************************************************************/
|
|
73
73
|
//#region RENDER
|
|
74
74
|
render() {
|
|
75
|
-
return (index.h(index.Host, { key: '
|
|
75
|
+
return (index.h(index.Host, { key: '296afbaf68b6883a35fa67651ffef9052a604c51', class: clsxChV9xqsO.clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, index.h("svg", { key: '8d6977768135682a5c3777bacc55d5e0553211c1', stroke: "currentColor", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: `nv-icon-${this.size}` }, index.h("use", { key: '91f29aae64f5f32ecc95382f0cdb8338112ee332', href: `#nvicon_${this.name}` }))));
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
NvIcon.style = nvIconCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
4
|
var clsxChV9xqsO = require('./clsx-ChV9xqsO-BtxeOLZW.js');
|
|
5
5
|
require('@stencil/react-output-target/runtime');
|
|
6
6
|
require('react');
|
|
@@ -128,7 +128,7 @@ const NvIconbutton = class {
|
|
|
128
128
|
/****************************************************************************/
|
|
129
129
|
//#region RENDER
|
|
130
130
|
render() {
|
|
131
|
-
return (index.h(index.Host, { key: '
|
|
131
|
+
return (index.h(index.Host, { key: '9b96d47b036561ab1458f193bf7a3b749e6189da', role: "button", type: this.type, tabindex: this.disableTabindex ? -1 : 0, disabled: this.disabled ? true : undefined, class: clsxChV9xqsO.clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && index.h("nv-loader", { key: 'cd55b87aae05c11cf9759421a2aa3c15fef8a19f', size: this.size }), !this.loading && index.h("nv-icon", { key: '1fb7bd007f0bde6693bc2241b4e3baa57e0a7fc0', name: this.name, size: this.size }), index.h("slot", { key: 'd2cc6d92bb9714d1b204e75c664b965d696a2fae' })));
|
|
132
132
|
}
|
|
133
133
|
static get formAssociated() { return true; }
|
|
134
134
|
get el() { return index.getElement(this); }
|
|
@@ -162,7 +162,7 @@ const NvLoader = class {
|
|
|
162
162
|
//#region RENDER
|
|
163
163
|
/* <slot> empty to force rendering change */
|
|
164
164
|
render() {
|
|
165
|
-
return (index.h(index.Host, { key: '
|
|
165
|
+
return (index.h(index.Host, { key: '8cac2279ffe58fe0243f638c9d55d2f0e5a8443a', class: clsxChV9xqsO.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
NvLoader.style = nvLoaderCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
4
|
require('@stencil/react-output-target/runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -192,7 +192,7 @@ const NvMenu = class {
|
|
|
192
192
|
this.triggerElement = this.el.querySelector('[slot="trigger"]');
|
|
193
193
|
}
|
|
194
194
|
render() {
|
|
195
|
-
return (index.h(index.Host, { key: '
|
|
195
|
+
return (index.h(index.Host, { key: 'efaa7d9242c23b27395dc1584ea05300ce3142d8' }, index.h("slot", { key: '42be7569ce9b393f2f22daabbe4f7594e3e48a7a', name: "trigger" }), index.h("nv-popover", { key: '55a12dabf7230a3fbb5e1811b4d211a4c9c7514a', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open, onOpenChanged: this.handleOpenChanged.bind(this) }, this.items ? (index.h("ul", { slot: "content" }, this.renderMenuItems())) : (index.h("slot", { name: "content" })))));
|
|
196
196
|
}
|
|
197
197
|
get el() { return index.getElement(this); }
|
|
198
198
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
4
|
require('@stencil/react-output-target/runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -50,7 +50,7 @@ const NvMenuitem = class {
|
|
|
50
50
|
/****************************************************************************/
|
|
51
51
|
//#region RENDER
|
|
52
52
|
render() {
|
|
53
|
-
return (index.h(index.Host, { key: '
|
|
53
|
+
return (index.h(index.Host, { key: '052f7822782c1a50cfc207dc6c7090e9ae7ddb23', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: 'b6fb4a24573d6ce2a65d1fbec49f25084aca4efc', name: this.icon }), index.h("slot", { key: 'dd4b413f909db1b13a642411532b4980fe495bcf' }), this.label && index.h("span", { key: '06e14c729b5d1a8c7fb58797fcf345eb15d02be4', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: '53802fa02a1c643b8f04ec71365115c469016e65' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: 'ef8e14ab9147ef7cba4e160a053e4900aac9a927', name: "chevron-right" })));
|
|
54
54
|
}
|
|
55
55
|
get el() { return index.getElement(this); }
|
|
56
56
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
|
+
var constantsGOKBmbgZ = require('./constants-gOKBmbgZ-CSoZ8z-G.js');
|
|
5
5
|
var collapse_animationDZDm0vSK = require('./collapse.animation-DZDm0vSK-C2TOIhIK.js');
|
|
6
6
|
var fade_animationDcRL9lcm = require('./fade.animation-DcRL9lcm-DAZeHoKN.js');
|
|
7
7
|
require('./style-value-types.es-xlgmw4x8-B1vLqX9m.js');
|
|
@@ -53,18 +53,18 @@ const NvNotification = class {
|
|
|
53
53
|
/****************************************************************************/
|
|
54
54
|
//#region INTERNAL
|
|
55
55
|
this.iconByFeedback = {
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
56
|
+
[constantsGOKBmbgZ.FeedbackColors.Warning]: 'alert-circle',
|
|
57
|
+
[constantsGOKBmbgZ.FeedbackColors.Information]: 'info-circle',
|
|
58
|
+
[constantsGOKBmbgZ.FeedbackColors.Success]: 'circle-check',
|
|
59
|
+
[constantsGOKBmbgZ.FeedbackColors.Error]: 'alert-triangle',
|
|
60
|
+
[constantsGOKBmbgZ.FeedbackColors.Neutral]: 'help',
|
|
61
61
|
};
|
|
62
62
|
this.roleByFeedback = {
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
63
|
+
[constantsGOKBmbgZ.FeedbackColors.Error]: 'alert',
|
|
64
|
+
[constantsGOKBmbgZ.FeedbackColors.Warning]: 'alert',
|
|
65
|
+
[constantsGOKBmbgZ.FeedbackColors.Information]: 'status',
|
|
66
|
+
[constantsGOKBmbgZ.FeedbackColors.Success]: 'status',
|
|
67
|
+
[constantsGOKBmbgZ.FeedbackColors.Neutral]: 'status',
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
//#endregion PROPERTIES
|
|
@@ -118,15 +118,15 @@ const NvNotification = class {
|
|
|
118
118
|
}
|
|
119
119
|
getSlideDestination(pos) {
|
|
120
120
|
switch (pos) {
|
|
121
|
-
case
|
|
122
|
-
case
|
|
121
|
+
case constantsGOKBmbgZ.NotificationPosition.TopRight:
|
|
122
|
+
case constantsGOKBmbgZ.NotificationPosition.BottomRight:
|
|
123
123
|
return { axis: 'x', to: 100 }; // right
|
|
124
|
-
case
|
|
125
|
-
case
|
|
124
|
+
case constantsGOKBmbgZ.NotificationPosition.TopLeft:
|
|
125
|
+
case constantsGOKBmbgZ.NotificationPosition.BottomLeft:
|
|
126
126
|
return { axis: 'x', to: -100 }; // left
|
|
127
|
-
case
|
|
127
|
+
case constantsGOKBmbgZ.NotificationPosition.TopCenter:
|
|
128
128
|
return { axis: 'y', to: -100 }; // up
|
|
129
|
-
case
|
|
129
|
+
case constantsGOKBmbgZ.NotificationPosition.BottomCenter:
|
|
130
130
|
return { axis: 'y', to: 100 }; // down
|
|
131
131
|
default:
|
|
132
132
|
return { axis: 'x', to: 100 }; // fallback
|
|
@@ -167,7 +167,7 @@ const NvNotification = class {
|
|
|
167
167
|
/****************************************************************************/
|
|
168
168
|
//#region RENDER
|
|
169
169
|
render() {
|
|
170
|
-
return (index.h(index.Host, { key: '
|
|
170
|
+
return (index.h(index.Host, { key: '32af1308aa22ce8228416fcce23ce5b75111895b', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": this.getHeadingId() ?? null, "aria-describedby": this.getMessageId() ?? null, tabindex: "-1" }, index.h("div", { key: 'e63deeef95ae6c0e3fe1d8ce178c5dbe9d82f88c', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '1b66875001f685293d83bbe90a85b297b335c024', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'b1be8798751f60f41925ea92e40df697eb15fa42', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'a922d93bddb729fa7674199d438833544d48da2e', name: this.icon ?? this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: 'a55e449e8e17560a70d3d40ff3b9e7e2855fbbac', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: 'd4c7b85c8b9c5c488b86ba4c8f0c456b8ea3ca2d', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: 'e1ef0d24ae77ee788c63d66bed7fee308f3f9d13', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: 'cd7d469058230fec03311e485da0360766633dd0', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: 'cd5000e571c1a7b19bbb0f59e58e938ee4e51361', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: 'b0a19b512cc2fbce22907ac28828429202378e75', "data-scope": "actions" }, index.h("slot", { key: 'd40e04eb94154b319c8e212c76f1d932942137d0', name: "actions" })))))));
|
|
171
171
|
}
|
|
172
172
|
get el() { return index.getElement(this); }
|
|
173
173
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
4
|
require('@stencil/react-output-target/runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -21,7 +21,7 @@ const NvNotificationContainer = class {
|
|
|
21
21
|
/****************************************************************************/
|
|
22
22
|
//#region RENDER
|
|
23
23
|
render() {
|
|
24
|
-
return (index.h(index.Host, { key: '
|
|
24
|
+
return (index.h(index.Host, { key: '3618bd72eb82ee09c8c971d83ea3e0dbb58f6fbf', class: `position-${this.position}` }, index.h("slot", { key: 'ed0d1b37dd23e984365a92d45c6ecae31a5bbac9' })));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
NvNotificationContainer.style = nvNotificationcontainerCss();
|
package/dist/cjs/{nv-pagination-nav.entry-BYvcVj1M.js → nv-pagination-nav.entry-DbzEBjoa.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DXwd3F_r.js');
|
|
4
4
|
require('@stencil/react-output-target/runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-dom');
|
|
@@ -180,7 +180,7 @@ const NvPaginationNav = class {
|
|
|
180
180
|
render() {
|
|
181
181
|
const isFirstPage = this.currentPage === 1;
|
|
182
182
|
const isLastPage = this.currentPage === this.totalPages;
|
|
183
|
-
return (index.h(index.Host, { key: '
|
|
183
|
+
return (index.h(index.Host, { key: '2aecff38a5777b1e229b04110e774d4ac708e940' }, index.h("nav", { key: 'a470aab7d30178269f25eb794b447b6478ed274d', "data-scope": "pagination-nav", "aria-label": "Pagination navigation" }, this.isOnlyIcon ? (index.h("nv-iconbutton", { name: "chevron-left", size: "md", emphasis: "lower", disabled: isFirstPage, onClick: () => this.handlePageChange(this.currentPage - 1), "data-scope": "previous-iconbutton", "aria-label": this.previousButtonLabel })) : (index.h("nv-button", { size: "md", emphasis: "lower", disabled: isFirstPage, onClick: () => this.handlePageChange(this.currentPage - 1), "data-scope": "previous-button" }, index.h("nv-icon", { slot: "leading-icon", name: "chevron-left" }), this.previousButtonLabel)), index.h("ol", { key: '4ea58c4f536310c0d60354da84d9fd650a16dc67', "data-scope": "page-list" }, calculatePaginationRange({
|
|
184
184
|
currentPage: this.currentPage,
|
|
185
185
|
totalCount: this.totalCount,
|
|
186
186
|
pageSize: this.pageSize,
|