@nova-design-system/nova-react 3.14.0 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{collapse.animation-acda1bf5-BuORVmQv.js → collapse.animation-6e0b08df-AHWzNGm_.js} +4 -1
- package/dist/cjs/{constants-d0f19e7b-s0SCO_vi.js → constants-69bafca2-DpB_ghPF.js} +9 -0
- package/dist/cjs/{fade.animation-eb454088-Bma0SpTf.js → fade.animation-9b939939-DV--bM4S.js} +2 -2
- package/dist/cjs/{index-CKAZvszR.js → index-7K7BV1CP.js} +4676 -1345
- package/dist/cjs/index.js +10 -2
- package/dist/cjs/{nv-accordion-item.entry-CjBcmF8t.js → nv-accordion-item.entry-C-9tYw-c.js} +6 -5
- package/dist/cjs/{nv-accordion.entry-CRk2Wvt3.js → nv-accordion.entry-BA3mTIdj.js} +7 -6
- package/dist/cjs/{nv-alert.entry-D5qB5xZg.js → nv-alert.entry-Bic-YGW1.js} +13 -12
- package/dist/cjs/nv-avatar.entry-C-yd0YlD.js +68 -0
- package/dist/cjs/{nv-badge_2.entry-BDuX1qOQ.js → nv-badge_2.entry-B_8yvNXL.js} +11 -10
- package/dist/cjs/{nv-breadcrumb.entry-BE9U6AF_.js → nv-breadcrumb.entry-BCTbG942.js} +3 -2
- package/dist/cjs/{nv-breadcrumbs.entry-DJXqtmMR.js → nv-breadcrumbs.entry-C9B5Baf7.js} +2 -1
- package/dist/cjs/nv-button.entry-DgX8Bwmq.js +165 -0
- package/dist/cjs/{nv-buttongroup.entry-C0Zc2lOi.js → nv-buttongroup.entry-CKhZN_Yf.js} +2 -1
- package/dist/cjs/{nv-calendar.entry-NbVLStMN.js → nv-calendar.entry-E6Pk83WA.js} +8 -7
- package/dist/cjs/{nv-col.entry-ahFf8a1Z.js → nv-col.entry-CkZpukX9.js} +2 -1
- package/dist/cjs/{nv-datagrid.entry-C-MJXEdi.js → nv-datagrid.entry-RsfP7vbC.js} +183 -15
- package/dist/cjs/{nv-datagridcolumn.entry-CxU7soW7.js → nv-datagridcolumn.entry-D4VrDWo9.js} +2 -1
- package/dist/cjs/{nv-dialog.entry-WlnaC-w2.js → nv-dialog.entry-BhtWpYHl.js} +34 -30
- package/dist/cjs/{nv-dialogfooter_2.entry-CEWmTnJc.js → nv-dialogfooter_2.entry-BXLYmzYl.js} +6 -5
- package/dist/cjs/{nv-fieldcheckbox.entry-BYhFVrYb.js → nv-fieldcheckbox.entry-D96Nm6DZ.js} +3 -2
- package/dist/cjs/{nv-fielddate.entry-DVVnRiOT.js → nv-fielddate.entry-ty37R9jF.js} +52 -26
- package/dist/cjs/{nv-fielddaterange.entry-Cb4X5Q-C.js → nv-fielddaterange.entry-BSIRu_mq.js} +69 -42
- package/dist/cjs/{nv-fielddropdown.entry-D2PKGkpx.js → nv-fielddropdown.entry-CUzvIoZZ.js} +34 -7
- package/dist/cjs/{nv-fielddropdownitem.entry-BqgMRnIc.js → nv-fielddropdownitem.entry-D-GTxLNk.js} +2 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-Dzw4c9wO.js → nv-fieldmultiselect.entry-DFY2bf6s.js} +188 -156
- package/dist/cjs/{nv-fieldnumber.entry-Cm5g6tw7.js → nv-fieldnumber.entry-CILclJ7Q.js} +3 -2
- package/dist/cjs/{nv-fieldpassword.entry-BMI5M4RR.js → nv-fieldpassword.entry-CdR-NM8e.js} +3 -2
- package/dist/cjs/{nv-fieldradio.entry-BrCJvkMR.js → nv-fieldradio.entry-lC4scIvU.js} +3 -2
- package/dist/cjs/{nv-fieldselect.entry-Cz76Y4Fb.js → nv-fieldselect.entry-CYu6870F.js} +3 -2
- package/dist/cjs/{nv-fieldslider.entry-C2ynnMK8.js → nv-fieldslider.entry-DOuJAR6P.js} +3 -2
- package/dist/cjs/{nv-fieldtext.entry-B6ciu2fU.js → nv-fieldtext.entry-BFLUiPa4.js} +3 -2
- package/dist/cjs/{nv-fieldtextarea.entry-BL_gMvTp.js → nv-fieldtextarea.entry-BeI0k97G.js} +3 -2
- package/dist/cjs/{nv-fieldtime.entry-Be5fujXA.js → nv-fieldtime.entry-C28EAKki.js} +82 -68
- package/dist/cjs/nv-icon.entry-BXgjUpe_.js +80 -0
- package/dist/cjs/{nv-iconbutton_2.entry-Dlk96yHi.js → nv-iconbutton_2.entry-CpIkxrp9.js} +3 -2
- package/dist/cjs/{nv-menu.entry-CDn1Tk9J.js → nv-menu.entry-as-NOsF-.js} +25 -9
- package/dist/cjs/{nv-menuitem.entry-DIkQnha9.js → nv-menuitem.entry-D8KAh6nr.js} +2 -1
- package/dist/cjs/nv-notification.entry-C-_jV-DL.js +262 -0
- package/dist/cjs/nv-notificationcontainer.entry-CMn42loT.js +41 -0
- package/dist/cjs/{nv-popover.entry-Bz9ZWGlN.js → nv-popover.entry--BhEBSir.js} +72 -65
- package/dist/cjs/{nv-row.entry-iJGXINmZ.js → nv-row.entry-BxhcK9aY.js} +3 -2
- package/dist/cjs/{nv-stack.entry-CifEjR2g.js → nv-stack.entry-C3DF9jJZ.js} +3 -2
- package/dist/cjs/nv-table.entry-pfEGt2KH.js +245 -0
- package/dist/cjs/nv-toggle.entry-ChpqtQtn.js +80 -0
- package/dist/cjs/{nv-togglebutton.entry-X4eLeP-C.js → nv-togglebutton.entry-DE7CKmeN.js} +3 -2
- package/dist/cjs/{nv-togglebuttongroup.entry-BYO58vql.js → nv-togglebuttongroup.entry-BJPjdmHD.js} +3 -2
- package/dist/cjs/{nv-tooltip.entry-DaxjQSt1.js → nv-tooltip.entry-D9-Fga6C.js} +3 -2
- package/dist/components/NvDatatable.js +45 -0
- package/dist/generated/components.js +10 -10
- package/dist/generated/components.server.js +9 -17
- package/dist/index.js +2 -0
- package/dist/providers/NotificationProvider.js +83 -0
- package/dist/types/components/NvDatatable.d.ts +25 -0
- package/dist/types/generated/components.d.ts +5 -12
- package/dist/types/generated/components.server.d.ts +5 -12
- package/dist/types/index.d.ts +2 -0
- package/dist/types/providers/NotificationProvider.d.ts +36 -0
- package/package.json +7 -3
- package/dist/cjs/dom.utils-ac71e0ef-CmIwRr6O.js +0 -168
- package/dist/cjs/nv-avatar.entry-CuNYdZl_.js +0 -67
- package/dist/cjs/nv-button.entry-CF5IDcG3.js +0 -164
- package/dist/cjs/nv-icon.entry-C-wbfOy3.js +0 -79
- package/dist/cjs/nv-notification.entry-BiwnZCkF.js +0 -178
- package/dist/cjs/nv-table.entry-Dxg0j3fe.js +0 -338
- package/dist/cjs/nv-tablecolumn.entry--29MFEe9.js +0 -18
- package/dist/cjs/nv-toggle.entry-D0eQoEqf.js +0 -79
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-7K7BV1CP.js');
|
|
4
|
+
var constants69bafca2 = require('./constants-69bafca2-DpB_ghPF.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
7
|
+
require('react-dom');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Checks if a string starts with a given prefix, ignoring case.
|
|
@@ -19,7 +20,7 @@ function startsWithIgnoreCase(str, prefix) {
|
|
|
19
20
|
return str.toLowerCase().startsWith(prefix.toLowerCase());
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
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{content:\"*\";color:var(--components-form-text-required);font-weight:700}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:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;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 .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;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: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){opacity:0.5;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 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:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}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:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}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::-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;margin-left:auto}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-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:\"TT Norms Pro\", 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:\"TT Norms Pro\", 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;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::-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: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)}";
|
|
23
|
+
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{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 .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;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: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){opacity:0.5;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 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:var(--form-field-padding-y) 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%;width:100%;min-width:24px;flex:0 0 24px;text-align:center;padding:0;margin:0}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[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::-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;margin-left:auto}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-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;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::-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: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)}";
|
|
23
24
|
const NvFieldtimeStyle0 = nvFieldtimeCss;
|
|
24
25
|
|
|
25
26
|
const NvFieldtime = class {
|
|
@@ -29,7 +30,7 @@ const NvFieldtime = class {
|
|
|
29
30
|
// Input elements for hours, minutes, and seconds
|
|
30
31
|
this.inputElements = {};
|
|
31
32
|
this.inputZeroAdded = {};
|
|
32
|
-
this.typeFocused =
|
|
33
|
+
this.typeFocused = constants69bafca2.TimeType.Hours;
|
|
33
34
|
/****************************************************************************/
|
|
34
35
|
//#region STATES
|
|
35
36
|
this.hours = '00';
|
|
@@ -142,20 +143,20 @@ const NvFieldtime = class {
|
|
|
142
143
|
else if (event.key === 'Enter' && currentIndex >= 0) {
|
|
143
144
|
event.preventDefault();
|
|
144
145
|
items[currentIndex].click();
|
|
145
|
-
if (this.typeFocused ===
|
|
146
|
-
(_a = this.inputElements[
|
|
147
|
-
(_b = this.inputElements[
|
|
146
|
+
if (this.typeFocused === constants69bafca2.TimeType.Hours) {
|
|
147
|
+
(_a = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
148
|
+
(_b = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
|
|
148
149
|
}
|
|
149
|
-
else if (this.typeFocused ===
|
|
150
|
-
this.typeFocused ===
|
|
151
|
-
(_c = this.inputElements[
|
|
152
|
-
(_d = this.inputElements[
|
|
150
|
+
else if (this.typeFocused === constants69bafca2.TimeType.Minutes ||
|
|
151
|
+
this.typeFocused === constants69bafca2.TimeType.Seconds) {
|
|
152
|
+
(_c = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
153
|
+
(_d = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
else if (event.key === 'Escape') {
|
|
156
157
|
event.preventDefault();
|
|
157
|
-
if (this.inputElements[
|
|
158
|
-
this.inputElements[
|
|
158
|
+
if (this.inputElements[constants69bafca2.TimeType.Hours]) {
|
|
159
|
+
this.inputElements[constants69bafca2.TimeType.Hours].blur();
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
}
|
|
@@ -165,6 +166,18 @@ const NvFieldtime = class {
|
|
|
165
166
|
handleValueChange(newValue) {
|
|
166
167
|
this.valueChanged.emit(newValue);
|
|
167
168
|
}
|
|
169
|
+
handleOpenChange(newOpen) {
|
|
170
|
+
// React to external changes, e.g., highlight current time on open
|
|
171
|
+
if (newOpen) {
|
|
172
|
+
// Re-highlight columns based on current value
|
|
173
|
+
const hourSelector = `.time-column.time-column-${constants69bafca2.TimeType.Hours} div`;
|
|
174
|
+
this.updateColumnHighlight(hourSelector, this.hours);
|
|
175
|
+
const minutesSelector = `.time-column.time-column-${constants69bafca2.TimeType.Minutes} div`;
|
|
176
|
+
this.updateColumnHighlight(minutesSelector, this.minutes);
|
|
177
|
+
const secondsSelector = `.time-column.time-column-${constants69bafca2.TimeType.Seconds} div`;
|
|
178
|
+
this.updateColumnHighlight(secondsSelector, this.seconds);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
168
181
|
//#endregion WATCHERS
|
|
169
182
|
/****************************************************************************/
|
|
170
183
|
//#region METHODS
|
|
@@ -173,13 +186,13 @@ const NvFieldtime = class {
|
|
|
173
186
|
const inputValue = inputElement.value.replace(/[^0-9]/g, ''); // Only keep numeric input
|
|
174
187
|
// Update the time value based on the type
|
|
175
188
|
switch (type) {
|
|
176
|
-
case
|
|
189
|
+
case constants69bafca2.TimeType.Hours:
|
|
177
190
|
this.handleHoursChange(inputValue, type);
|
|
178
191
|
break;
|
|
179
|
-
case
|
|
192
|
+
case constants69bafca2.TimeType.Minutes:
|
|
180
193
|
this.handleMinutesChange(inputValue, type);
|
|
181
194
|
break;
|
|
182
|
-
case
|
|
195
|
+
case constants69bafca2.TimeType.Seconds:
|
|
183
196
|
this.handleSecondsChange(inputValue, type);
|
|
184
197
|
break;
|
|
185
198
|
}
|
|
@@ -335,12 +348,12 @@ const NvFieldtime = class {
|
|
|
335
348
|
if (this.hours.length === 2 &&
|
|
336
349
|
!this.inputZeroAdded[type] &&
|
|
337
350
|
!reputedToZero) {
|
|
338
|
-
(_a = this.inputElements[
|
|
339
|
-
(_b = this.inputElements[
|
|
351
|
+
(_a = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
352
|
+
(_b = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
|
|
340
353
|
}
|
|
341
354
|
else if (reputedToZero) {
|
|
342
|
-
(_c = this.inputElements[
|
|
343
|
-
(_d = this.inputElements[
|
|
355
|
+
(_c = this.inputElements[constants69bafca2.TimeType.Hours]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
356
|
+
(_d = this.inputElements[constants69bafca2.TimeType.Hours]) === null || _d === void 0 ? void 0 : _d.select();
|
|
344
357
|
}
|
|
345
358
|
}
|
|
346
359
|
handleMinutesChange(inputValue, type) {
|
|
@@ -493,12 +506,12 @@ const NvFieldtime = class {
|
|
|
493
506
|
if (this.minutes.length === 2 &&
|
|
494
507
|
!this.inputZeroAdded[type] &&
|
|
495
508
|
!reputedToZero) {
|
|
496
|
-
(_c = this.inputElements[
|
|
497
|
-
(_d = this.inputElements[
|
|
509
|
+
(_c = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
510
|
+
(_d = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
498
511
|
}
|
|
499
512
|
else if (reputedToZero) {
|
|
500
|
-
(_e = this.inputElements[
|
|
501
|
-
(_f = this.inputElements[
|
|
513
|
+
(_e = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _e === void 0 ? void 0 : _e.focus();
|
|
514
|
+
(_f = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _f === void 0 ? void 0 : _f.select();
|
|
502
515
|
}
|
|
503
516
|
}
|
|
504
517
|
handleSecondsChange(inputValue, type) {
|
|
@@ -626,8 +639,8 @@ const NvFieldtime = class {
|
|
|
626
639
|
}
|
|
627
640
|
}
|
|
628
641
|
if (reputedToZero) {
|
|
629
|
-
(_c = this.inputElements[
|
|
630
|
-
(_d = this.inputElements[
|
|
642
|
+
(_c = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
643
|
+
(_d = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
631
644
|
}
|
|
632
645
|
}
|
|
633
646
|
// Parse a continuous time string (e.g., "123456") into hours, minutes, and seconds
|
|
@@ -681,26 +694,26 @@ const NvFieldtime = class {
|
|
|
681
694
|
if (this.disabled || this.readonly) {
|
|
682
695
|
return; // Do not toggle if disabled or read-only
|
|
683
696
|
}
|
|
684
|
-
if (this.open && this.inputElements[
|
|
697
|
+
if (this.open && this.inputElements[constants69bafca2.TimeType.Hours]) {
|
|
685
698
|
this.open = false; // Close the popover if it is open
|
|
686
699
|
}
|
|
687
|
-
else if (this.open && this.inputElements[
|
|
700
|
+
else if (this.open && this.inputElements[constants69bafca2.TimeType.Minutes]) {
|
|
688
701
|
this.open = false; // Close the popover if it is open
|
|
689
702
|
}
|
|
690
|
-
else if (this.open && this.inputElements[
|
|
703
|
+
else if (this.open && this.inputElements[constants69bafca2.TimeType.Seconds]) {
|
|
691
704
|
this.open = false; // Close the popover if it is open
|
|
692
705
|
}
|
|
693
|
-
else if (!this.open && this.inputElements[
|
|
694
|
-
(_a = this.inputElements[
|
|
695
|
-
(_b = this.inputElements[
|
|
706
|
+
else if (!this.open && this.inputElements[constants69bafca2.TimeType.Hours]) {
|
|
707
|
+
(_a = this.inputElements[constants69bafca2.TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus(); // Focus will open the popover
|
|
708
|
+
(_b = this.inputElements[constants69bafca2.TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
|
|
696
709
|
}
|
|
697
|
-
else if (!this.open && this.inputElements[
|
|
698
|
-
(_c = this.inputElements[
|
|
699
|
-
(_d = this.inputElements[
|
|
710
|
+
else if (!this.open && this.inputElements[constants69bafca2.TimeType.Minutes]) {
|
|
711
|
+
(_c = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _c === void 0 ? void 0 : _c.focus(); // Focus will open the popover
|
|
712
|
+
(_d = this.inputElements[constants69bafca2.TimeType.Minutes]) === null || _d === void 0 ? void 0 : _d.select();
|
|
700
713
|
}
|
|
701
|
-
else if (!this.open && this.inputElements[
|
|
702
|
-
(_e = this.inputElements[
|
|
703
|
-
(_f = this.inputElements[
|
|
714
|
+
else if (!this.open && this.inputElements[constants69bafca2.TimeType.Seconds]) {
|
|
715
|
+
(_e = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _e === void 0 ? void 0 : _e.focus(); // Focus will open the popover
|
|
716
|
+
(_f = this.inputElements[constants69bafca2.TimeType.Seconds]) === null || _f === void 0 ? void 0 : _f.select();
|
|
704
717
|
}
|
|
705
718
|
else {
|
|
706
719
|
console.warn('nv-fieldtime -> No input elements found to focus or to blur');
|
|
@@ -722,13 +735,13 @@ const NvFieldtime = class {
|
|
|
722
735
|
}
|
|
723
736
|
handleTimeOptionClick(event, type) {
|
|
724
737
|
const option = parseInt(event.target.textContent || '0', 10);
|
|
725
|
-
if (type ===
|
|
738
|
+
if (type === constants69bafca2.TimeType.Hours) {
|
|
726
739
|
this.hours = option.toString().padStart(2, '0');
|
|
727
740
|
}
|
|
728
|
-
else if (type ===
|
|
741
|
+
else if (type === constants69bafca2.TimeType.Minutes) {
|
|
729
742
|
this.minutes = option.toString().padStart(2, '0');
|
|
730
743
|
}
|
|
731
|
-
else if (type ===
|
|
744
|
+
else if (type === constants69bafca2.TimeType.Seconds) {
|
|
732
745
|
this.seconds = option.toString().padStart(2, '0');
|
|
733
746
|
}
|
|
734
747
|
const reconstructTime = this.reconstructTime();
|
|
@@ -779,11 +792,11 @@ const NvFieldtime = class {
|
|
|
779
792
|
}
|
|
780
793
|
// Generate the time options based on the type
|
|
781
794
|
switch (type) {
|
|
782
|
-
case
|
|
795
|
+
case constants69bafca2.TimeType.Hours:
|
|
783
796
|
return this.generateHourOptions(stepInSeconds);
|
|
784
|
-
case
|
|
797
|
+
case constants69bafca2.TimeType.Minutes:
|
|
785
798
|
return this.generateMinuteOptions(stepInSeconds);
|
|
786
|
-
case
|
|
799
|
+
case constants69bafca2.TimeType.Seconds:
|
|
787
800
|
return this.generateSecondOptions(stepInSeconds);
|
|
788
801
|
default:
|
|
789
802
|
return [];
|
|
@@ -885,8 +898,8 @@ const NvFieldtime = class {
|
|
|
885
898
|
}
|
|
886
899
|
if (!this.open) {
|
|
887
900
|
if (this.inputElements) {
|
|
888
|
-
(_a = this.inputElements[
|
|
889
|
-
(_b = this.inputElements[
|
|
901
|
+
(_a = this.inputElements[constants69bafca2.TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
902
|
+
(_b = this.inputElements[constants69bafca2.TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
|
|
890
903
|
}
|
|
891
904
|
event.preventDefault();
|
|
892
905
|
}
|
|
@@ -976,37 +989,38 @@ const NvFieldtime = class {
|
|
|
976
989
|
RenderTimeOptionsColumn(type) {
|
|
977
990
|
return (index.h("div", { class: `time-column time-column-${type}`, onScroll: e => this.handleScroll(e, type) }, this.generateInfiniteTimeOptions(type).map((option, index$1) => (index.h("div", { class: {
|
|
978
991
|
'time-option': true,
|
|
979
|
-
'selected': (type ===
|
|
980
|
-
(type ===
|
|
981
|
-
(type ===
|
|
992
|
+
'selected': (type === constants69bafca2.TimeType.Hours && option === this.hours) ||
|
|
993
|
+
(type === constants69bafca2.TimeType.Minutes && option === this.minutes) ||
|
|
994
|
+
(type === constants69bafca2.TimeType.Seconds && option === this.seconds),
|
|
982
995
|
}, key: `${option}-${index$1}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
983
996
|
}
|
|
984
997
|
render() {
|
|
985
|
-
return (index.h(index.Host, { key: '
|
|
986
|
-
index.h("input", { key: '
|
|
987
|
-
? `${
|
|
988
|
-
:
|
|
998
|
+
return (index.h(index.Host, { key: 'ef5f12cdbd62c18033f57ff176775b5ee62ebb85', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '64e20904debf287e69e5717f2d28ac4a700b7f15', htmlFor: this.inputId }, index.h("slot", { key: 'e0644a80e23854ca06baf8b52b00649a0e6f1ed9', name: "label" }, this.label))), index.h("nv-popover", { key: '98d71eeb73ce93c16c488e80f79bbe269a44ddc3', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: '9a7d256f3c64aed3314338c8306540d92dddaad0', class: "input-wrapper", slot: "trigger" }, index.h("slot", { key: 'ac0e04737b86e4767e4c249ee95e4b69a41ea387', name: "before-input" }), index.h("div", { key: '1f04ff2f539048eb00500b2fbbeaf86ce1698065', class: "input-container" }, index.h("slot", { key: '60ee3a49ea9ca9509224c57dc64f3ccab7f89312', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
999
|
+
index.h("input", { key: 'cb8a979ce6e4d83074e0c9046bbf3a60821e5262', ref: el => (this.inputElements[constants69bafca2.TimeType.Hours] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, constants69bafca2.TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(constants69bafca2.TimeType.Hours), name: this.name
|
|
1000
|
+
? `${constants69bafca2.TimeType.Hours}-${this.name}`
|
|
1001
|
+
: constants69bafca2.TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
989
1002
|
], this.format.includes('mm') && [
|
|
990
|
-
index.h("span", { key: '
|
|
991
|
-
index.h("input", { key: '
|
|
992
|
-
? `${
|
|
993
|
-
:
|
|
1003
|
+
index.h("span", { key: '74f9604ffd54e0c0bbd88996e32fdcb08f2c3645' }, ":"),
|
|
1004
|
+
index.h("input", { key: '52f9b637bba804cac6fadff06e8b077bb2f5748a', ref: el => (this.inputElements[constants69bafca2.TimeType.Minutes] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, constants69bafca2.TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(constants69bafca2.TimeType.Minutes), name: this.name
|
|
1005
|
+
? `${constants69bafca2.TimeType.Minutes}-${this.name}`
|
|
1006
|
+
: constants69bafca2.TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
994
1007
|
], this.format.includes('ss') && [
|
|
995
|
-
index.h("span", { key: '
|
|
996
|
-
index.h("input", { key: '
|
|
997
|
-
? `${
|
|
998
|
-
:
|
|
999
|
-
], index.h("nv-iconbutton", { key: '
|
|
1000
|
-
this.RenderTimeOptionsColumn(
|
|
1001
|
-
this.RenderTimeOptionsColumn(
|
|
1002
|
-
this.RenderTimeOptionsColumn(
|
|
1003
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
1004
|
-
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '
|
|
1008
|
+
index.h("span", { key: '878bc9ce7557e9cf9471803a86956a9184d0ccb5' }, ":"),
|
|
1009
|
+
index.h("input", { key: 'b074d4d3ef80f66e7dbe051b6bc53f151661f409', ref: el => (this.inputElements[constants69bafca2.TimeType.Seconds] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, constants69bafca2.TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(constants69bafca2.TimeType.Seconds), name: this.name
|
|
1010
|
+
? `${constants69bafca2.TimeType.Seconds}-${this.name}`
|
|
1011
|
+
: constants69bafca2.TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
1012
|
+
], index.h("nv-iconbutton", { key: '3f5d78116ee60d1874a4629d9cf36a06d52b7df4', 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: '4b2356cf95131af213a4e98feede16fc8c4963db', name: "alert-circle", class: "validation", size: "sm" })), this.success && (index.h("nv-icon", { key: 'f9b0e61037049a36ac900d1af9ecc71b211ebd88', name: "circle-check", class: "validation", size: "sm" }))), index.h("slot", { key: '6177abde559c57f2b0586368ead1a61d7b543838', name: "after-input" })), index.h("div", { key: 'f6d5205a5011411550179f9337143163cb547fb1', class: "time-dropdown", slot: "content" }, index.h("div", { key: '9f0b3e1423bef197b269c5b11ce744cabc2bd6c4', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
1013
|
+
this.RenderTimeOptionsColumn(constants69bafca2.TimeType.Hours), this.format.includes('mm') &&
|
|
1014
|
+
this.RenderTimeOptionsColumn(constants69bafca2.TimeType.Minutes), this.format.includes('ss') &&
|
|
1015
|
+
this.RenderTimeOptionsColumn(constants69bafca2.TimeType.Seconds)))), (this.description ||
|
|
1016
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '1076ded73b32ff9afbd0f02184febcc82f8d839e', class: "description" }, index.h("slot", { key: '479d09b299d0e380533a6cd689ce7f03aa92ea8e', name: "description" }, this.description))), (this.errorDescription ||
|
|
1017
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '5615246dbd797c300be357be37d3b9d0aee56e31', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '6568ea3f9e0bdf85dd280c645956f8e0bb592e35', name: "error-description" }, this.errorDescription)))));
|
|
1005
1018
|
}
|
|
1006
1019
|
static get formAssociated() { return true; }
|
|
1007
1020
|
get el() { return index.getElement(this); }
|
|
1008
1021
|
static get watchers() { return {
|
|
1009
|
-
"value": ["handleValueChange"]
|
|
1022
|
+
"value": ["handleValueChange"],
|
|
1023
|
+
"open": ["handleOpenChange"]
|
|
1010
1024
|
}; }
|
|
1011
1025
|
};
|
|
1012
1026
|
NvFieldtime.style = NvFieldtimeStyle0;
|