@nova-design-system/nova-react 3.10.1-beta.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-B-1F0q3j.js → index-jBgPO7HC.js} +379 -79
- package/dist/cjs/index.js +64 -1
- package/dist/cjs/{nv-accordion-item.entry-BF6TIAqX.js → nv-accordion-item.entry-BUb_Apy8.js} +1 -1
- package/dist/cjs/{nv-accordion.entry-CaTzxCZe.js → nv-accordion.entry-hi3M0POV.js} +1 -1
- package/dist/cjs/{nv-alert.entry-EOVv8IiE.js → nv-alert.entry-nzJu8E5h.js} +8 -8
- package/dist/cjs/{nv-avatar.entry-DyiNDtz4.js → nv-avatar.entry-BPp1d-QO.js} +7 -7
- package/dist/cjs/{nv-badge_2.entry-DTc3EkVi.js → nv-badge_2.entry-Bk56p4jv.js} +2 -2
- package/dist/cjs/{nv-breadcrumb.entry-DKmd0vLH.js → nv-breadcrumb.entry-DB3zR7FC.js} +2 -2
- package/dist/cjs/{nv-breadcrumbs.entry-CQB0c_7Y.js → nv-breadcrumbs.entry-CoGgEsro.js} +1 -1
- package/dist/cjs/{nv-button.entry-rPyTGZZw.js → nv-button.entry-psZ3_t6i.js} +8 -8
- package/dist/cjs/{nv-buttongroup.entry-BT9JC-IJ.js → nv-buttongroup.entry-cNenBx1F.js} +1 -1
- package/dist/cjs/{nv-calendar.entry-C4stLDAG.js → nv-calendar.entry-nkrORr_V.js} +7 -7
- package/dist/cjs/{nv-col.entry-DY7HEDMv.js → nv-col.entry-D4mInxLU.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-yzQVVpxg.js → nv-datagrid.entry-D50O7eyc.js} +7 -7
- package/dist/cjs/{nv-datagridcolumn.entry-AOVwen5Y.js → nv-datagridcolumn.entry-BuGX-3ev.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-DztbR2hl.js → nv-dialog.entry-yiZIq-TV.js} +3 -3
- package/dist/cjs/{nv-dialogfooter_2.entry-iPMNyDQF.js → nv-dialogfooter_2.entry-C9ykJQK6.js} +3 -3
- package/dist/cjs/{nv-fieldcheckbox.entry-WEzw8Y0l.js → nv-fieldcheckbox.entry-CCRvvFJ3.js} +2 -2
- package/dist/cjs/{nv-fielddate.entry-B4B2QgCn.js → nv-fielddate.entry-C4k6k980.js} +2 -2
- package/dist/cjs/{nv-fielddaterange.entry-BQ-J4HKx.js → nv-fielddaterange.entry-BhfV2KCd.js} +2 -2
- package/dist/cjs/{nv-fielddropdown.entry-B2YBjdkI.js → nv-fielddropdown.entry-Xkkvl_gb.js} +2 -2
- package/dist/cjs/{nv-fielddropdownitem.entry-B0wCnSfT.js → nv-fielddropdownitem.entry-Ckwq6k6r.js} +1 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-DuPOvire.js → nv-fieldmultiselect.entry-D4PgRSFv.js} +2 -2
- package/dist/cjs/{nv-fieldnumber.entry-BJANMe4j.js → nv-fieldnumber.entry-BEnJ81XX.js} +2 -2
- package/dist/cjs/{nv-fieldpassword.entry-DkkJHwkG.js → nv-fieldpassword.entry-elzveqP8.js} +2 -2
- package/dist/cjs/{nv-fieldradio.entry-8uDJz8PS.js → nv-fieldradio.entry-xJpdsXGo.js} +2 -2
- package/dist/cjs/{nv-fieldselect.entry-DN6euwMc.js → nv-fieldselect.entry-DVyO7LMD.js} +2 -2
- package/dist/cjs/{nv-fieldslider.entry-BI72B0_Z.js → nv-fieldslider.entry-O4TFO-Rl.js} +1 -1
- package/dist/cjs/{nv-fieldtext.entry-DzHqp5Lp.js → nv-fieldtext.entry-p-9GEp1g.js} +1 -1
- package/dist/cjs/{nv-fieldtextarea.entry-CFgoC_mT.js → nv-fieldtextarea.entry-Cvik8cci.js} +1 -1
- package/dist/cjs/{nv-fieldtime.entry-nVAeh7Ot.js → nv-fieldtime.entry-mnsDon9M.js} +61 -61
- package/dist/cjs/nv-icon.entry-CrgnozDL.js +79 -0
- package/dist/cjs/{nv-iconbutton_2.entry-BnnDZjg4.js → nv-iconbutton_2.entry-M5EY3-1s.js} +2 -2
- package/dist/cjs/{nv-menu.entry-BB2mjwHV.js → nv-menu.entry-D7bORqXp.js} +1 -1
- package/dist/cjs/{nv-menuitem.entry-CgkJiqc_.js → nv-menuitem.entry-CaN6qNoB.js} +1 -1
- package/dist/cjs/{nv-popover.entry-_Iv8yq0t.js → nv-popover.entry-DGeXSyhZ.js} +22 -5
- package/dist/cjs/{nv-row.entry-BZ2prXQS.js → nv-row.entry-B17DsCjM.js} +1 -1
- package/dist/cjs/{nv-stack.entry-C69ZIFWU.js → nv-stack.entry-Dv3YU4nJ.js} +1 -1
- package/dist/cjs/{nv-table.entry-CXqK-89M.js → nv-table.entry-BILyG-43.js} +1 -1
- package/dist/cjs/{nv-tablecolumn.entry-RMYxY100.js → nv-tablecolumn.entry-II6Z_gdO.js} +1 -1
- package/dist/cjs/{nv-toggle.entry-Bx7cG_fC.js → nv-toggle.entry-5Wmww2Cd.js} +2 -2
- package/dist/cjs/nv-togglebutton.entry-Dnmfrj0O.js +55 -0
- package/dist/cjs/{nv-togglebuttongroup.entry-ehe00MUL.js → nv-togglebuttongroup.entry-C9mplQcb.js} +1 -1
- package/dist/cjs/nv-tooltip.entry-CcUQrjAv.js +54 -0
- package/dist/generated/components.server.js +3 -1
- package/dist/index.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +4 -2
- package/dist/cjs/nv-icon.entry-C0-IQQji.js +0 -79
- package/dist/cjs/nv-togglebutton.entry-CeYlChll.js +0 -55
- package/dist/cjs/nv-tooltip.entry-CCDVLdqi.js +0 -45
- /package/dist/cjs/{constants-23aaef7b-Cj2b-su0.js → constants-a857c476-Cj2b-su0.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-jBgPO7HC.js');
|
|
4
|
+
var constantsA857c476 = require('./constants-a857c476-Cj2b-su0.js');
|
|
5
5
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
6
|
require('react');
|
|
7
7
|
|
|
@@ -19,7 +19,7 @@ function startsWithIgnoreCase(str, prefix) {
|
|
|
19
19
|
return str.toLowerCase().startsWith(prefix.toLowerCase());
|
|
20
20
|
}
|
|
21
21
|
|
|
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-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)}";
|
|
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
23
|
const NvFieldtimeStyle0 = nvFieldtimeCss;
|
|
24
24
|
|
|
25
25
|
const NvFieldtime = class {
|
|
@@ -29,7 +29,7 @@ const NvFieldtime = class {
|
|
|
29
29
|
// Input elements for hours, minutes, and seconds
|
|
30
30
|
this.inputElements = {};
|
|
31
31
|
this.inputZeroAdded = {};
|
|
32
|
-
this.typeFocused =
|
|
32
|
+
this.typeFocused = constantsA857c476.TimeType.Hours;
|
|
33
33
|
/****************************************************************************/
|
|
34
34
|
//#region STATES
|
|
35
35
|
this.hours = '00';
|
|
@@ -142,20 +142,20 @@ const NvFieldtime = class {
|
|
|
142
142
|
else if (event.key === 'Enter' && currentIndex >= 0) {
|
|
143
143
|
event.preventDefault();
|
|
144
144
|
items[currentIndex].click();
|
|
145
|
-
if (this.typeFocused ===
|
|
146
|
-
(_a = this.inputElements[
|
|
147
|
-
(_b = this.inputElements[
|
|
145
|
+
if (this.typeFocused === constantsA857c476.TimeType.Hours) {
|
|
146
|
+
(_a = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
147
|
+
(_b = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
|
|
148
148
|
}
|
|
149
|
-
else if (this.typeFocused ===
|
|
150
|
-
this.typeFocused ===
|
|
151
|
-
(_c = this.inputElements[
|
|
152
|
-
(_d = this.inputElements[
|
|
149
|
+
else if (this.typeFocused === constantsA857c476.TimeType.Minutes ||
|
|
150
|
+
this.typeFocused === constantsA857c476.TimeType.Seconds) {
|
|
151
|
+
(_c = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
152
|
+
(_d = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
else if (event.key === 'Escape') {
|
|
156
156
|
event.preventDefault();
|
|
157
|
-
if (this.inputElements[
|
|
158
|
-
this.inputElements[
|
|
157
|
+
if (this.inputElements[constantsA857c476.TimeType.Hours]) {
|
|
158
|
+
this.inputElements[constantsA857c476.TimeType.Hours].blur();
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -173,13 +173,13 @@ const NvFieldtime = class {
|
|
|
173
173
|
const inputValue = inputElement.value.replace(/[^0-9]/g, ''); // Only keep numeric input
|
|
174
174
|
// Update the time value based on the type
|
|
175
175
|
switch (type) {
|
|
176
|
-
case
|
|
176
|
+
case constantsA857c476.TimeType.Hours:
|
|
177
177
|
this.handleHoursChange(inputValue, type);
|
|
178
178
|
break;
|
|
179
|
-
case
|
|
179
|
+
case constantsA857c476.TimeType.Minutes:
|
|
180
180
|
this.handleMinutesChange(inputValue, type);
|
|
181
181
|
break;
|
|
182
|
-
case
|
|
182
|
+
case constantsA857c476.TimeType.Seconds:
|
|
183
183
|
this.handleSecondsChange(inputValue, type);
|
|
184
184
|
break;
|
|
185
185
|
}
|
|
@@ -335,12 +335,12 @@ const NvFieldtime = class {
|
|
|
335
335
|
if (this.hours.length === 2 &&
|
|
336
336
|
!this.inputZeroAdded[type] &&
|
|
337
337
|
!reputedToZero) {
|
|
338
|
-
(_a = this.inputElements[
|
|
339
|
-
(_b = this.inputElements[
|
|
338
|
+
(_a = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
339
|
+
(_b = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _b === void 0 ? void 0 : _b.select();
|
|
340
340
|
}
|
|
341
341
|
else if (reputedToZero) {
|
|
342
|
-
(_c = this.inputElements[
|
|
343
|
-
(_d = this.inputElements[
|
|
342
|
+
(_c = this.inputElements[constantsA857c476.TimeType.Hours]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
343
|
+
(_d = this.inputElements[constantsA857c476.TimeType.Hours]) === null || _d === void 0 ? void 0 : _d.select();
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
handleMinutesChange(inputValue, type) {
|
|
@@ -493,12 +493,12 @@ const NvFieldtime = class {
|
|
|
493
493
|
if (this.minutes.length === 2 &&
|
|
494
494
|
!this.inputZeroAdded[type] &&
|
|
495
495
|
!reputedToZero) {
|
|
496
|
-
(_c = this.inputElements[
|
|
497
|
-
(_d = this.inputElements[
|
|
496
|
+
(_c = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
497
|
+
(_d = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
498
498
|
}
|
|
499
499
|
else if (reputedToZero) {
|
|
500
|
-
(_e = this.inputElements[
|
|
501
|
-
(_f = this.inputElements[
|
|
500
|
+
(_e = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _e === void 0 ? void 0 : _e.focus();
|
|
501
|
+
(_f = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _f === void 0 ? void 0 : _f.select();
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
handleSecondsChange(inputValue, type) {
|
|
@@ -626,8 +626,8 @@ const NvFieldtime = class {
|
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
if (reputedToZero) {
|
|
629
|
-
(_c = this.inputElements[
|
|
630
|
-
(_d = this.inputElements[
|
|
629
|
+
(_c = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
630
|
+
(_d = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _d === void 0 ? void 0 : _d.select();
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
// Parse a continuous time string (e.g., "123456") into hours, minutes, and seconds
|
|
@@ -681,26 +681,26 @@ const NvFieldtime = class {
|
|
|
681
681
|
if (this.disabled || this.readonly) {
|
|
682
682
|
return; // Do not toggle if disabled or read-only
|
|
683
683
|
}
|
|
684
|
-
if (this.open && this.inputElements[
|
|
684
|
+
if (this.open && this.inputElements[constantsA857c476.TimeType.Hours]) {
|
|
685
685
|
this.open = false; // Close the popover if it is open
|
|
686
686
|
}
|
|
687
|
-
else if (this.open && this.inputElements[
|
|
687
|
+
else if (this.open && this.inputElements[constantsA857c476.TimeType.Minutes]) {
|
|
688
688
|
this.open = false; // Close the popover if it is open
|
|
689
689
|
}
|
|
690
|
-
else if (this.open && this.inputElements[
|
|
690
|
+
else if (this.open && this.inputElements[constantsA857c476.TimeType.Seconds]) {
|
|
691
691
|
this.open = false; // Close the popover if it is open
|
|
692
692
|
}
|
|
693
|
-
else if (!this.open && this.inputElements[
|
|
694
|
-
(_a = this.inputElements[
|
|
695
|
-
(_b = this.inputElements[
|
|
693
|
+
else if (!this.open && this.inputElements[constantsA857c476.TimeType.Hours]) {
|
|
694
|
+
(_a = this.inputElements[constantsA857c476.TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus(); // Focus will open the popover
|
|
695
|
+
(_b = this.inputElements[constantsA857c476.TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
|
|
696
696
|
}
|
|
697
|
-
else if (!this.open && this.inputElements[
|
|
698
|
-
(_c = this.inputElements[
|
|
699
|
-
(_d = this.inputElements[
|
|
697
|
+
else if (!this.open && this.inputElements[constantsA857c476.TimeType.Minutes]) {
|
|
698
|
+
(_c = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _c === void 0 ? void 0 : _c.focus(); // Focus will open the popover
|
|
699
|
+
(_d = this.inputElements[constantsA857c476.TimeType.Minutes]) === null || _d === void 0 ? void 0 : _d.select();
|
|
700
700
|
}
|
|
701
|
-
else if (!this.open && this.inputElements[
|
|
702
|
-
(_e = this.inputElements[
|
|
703
|
-
(_f = this.inputElements[
|
|
701
|
+
else if (!this.open && this.inputElements[constantsA857c476.TimeType.Seconds]) {
|
|
702
|
+
(_e = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _e === void 0 ? void 0 : _e.focus(); // Focus will open the popover
|
|
703
|
+
(_f = this.inputElements[constantsA857c476.TimeType.Seconds]) === null || _f === void 0 ? void 0 : _f.select();
|
|
704
704
|
}
|
|
705
705
|
else {
|
|
706
706
|
console.warn('nv-fieldtime -> No input elements found to focus or to blur');
|
|
@@ -722,13 +722,13 @@ const NvFieldtime = class {
|
|
|
722
722
|
}
|
|
723
723
|
handleTimeOptionClick(event, type) {
|
|
724
724
|
const option = parseInt(event.target.textContent || '0', 10);
|
|
725
|
-
if (type ===
|
|
725
|
+
if (type === constantsA857c476.TimeType.Hours) {
|
|
726
726
|
this.hours = option.toString().padStart(2, '0');
|
|
727
727
|
}
|
|
728
|
-
else if (type ===
|
|
728
|
+
else if (type === constantsA857c476.TimeType.Minutes) {
|
|
729
729
|
this.minutes = option.toString().padStart(2, '0');
|
|
730
730
|
}
|
|
731
|
-
else if (type ===
|
|
731
|
+
else if (type === constantsA857c476.TimeType.Seconds) {
|
|
732
732
|
this.seconds = option.toString().padStart(2, '0');
|
|
733
733
|
}
|
|
734
734
|
const reconstructTime = this.reconstructTime();
|
|
@@ -779,11 +779,11 @@ const NvFieldtime = class {
|
|
|
779
779
|
}
|
|
780
780
|
// Generate the time options based on the type
|
|
781
781
|
switch (type) {
|
|
782
|
-
case
|
|
782
|
+
case constantsA857c476.TimeType.Hours:
|
|
783
783
|
return this.generateHourOptions(stepInSeconds);
|
|
784
|
-
case
|
|
784
|
+
case constantsA857c476.TimeType.Minutes:
|
|
785
785
|
return this.generateMinuteOptions(stepInSeconds);
|
|
786
|
-
case
|
|
786
|
+
case constantsA857c476.TimeType.Seconds:
|
|
787
787
|
return this.generateSecondOptions(stepInSeconds);
|
|
788
788
|
default:
|
|
789
789
|
return [];
|
|
@@ -885,8 +885,8 @@ const NvFieldtime = class {
|
|
|
885
885
|
}
|
|
886
886
|
if (!this.open) {
|
|
887
887
|
if (this.inputElements) {
|
|
888
|
-
(_a = this.inputElements[
|
|
889
|
-
(_b = this.inputElements[
|
|
888
|
+
(_a = this.inputElements[constantsA857c476.TimeType.Hours]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
889
|
+
(_b = this.inputElements[constantsA857c476.TimeType.Hours]) === null || _b === void 0 ? void 0 : _b.select();
|
|
890
890
|
}
|
|
891
891
|
event.preventDefault();
|
|
892
892
|
}
|
|
@@ -976,30 +976,30 @@ const NvFieldtime = class {
|
|
|
976
976
|
RenderTimeOptionsColumn(type) {
|
|
977
977
|
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
978
|
'time-option': true,
|
|
979
|
-
'selected': (type ===
|
|
980
|
-
(type ===
|
|
981
|
-
(type ===
|
|
979
|
+
'selected': (type === constantsA857c476.TimeType.Hours && option === this.hours) ||
|
|
980
|
+
(type === constantsA857c476.TimeType.Minutes && option === this.minutes) ||
|
|
981
|
+
(type === constantsA857c476.TimeType.Seconds && option === this.seconds),
|
|
982
982
|
}, key: `${option}-${index$1}`, onClick: e => this.handleTimeOptionClick(e, type) }, option)))));
|
|
983
983
|
}
|
|
984
984
|
render() {
|
|
985
985
|
return (index.h(index.Host, { key: 'a960e7daf8d9a323a55b0f248dd24f8e94321161', onclick: e => this.handleHostClick(e) }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '23c78f159cb32ef76d0d8b5a1171246c9c69fdb7', htmlFor: this.inputId }, index.h("slot", { key: '70b2361b44414dba4ca91b487a7b04872cc0d75d', name: "label" }, this.label))), index.h("nv-popover", { key: '80de55aa7eb0c165ed6871cb0ac6a5aec9046769', ref: el => (this.popoverElement = el), triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: 'fcd670c6dd32e6687540ddbdaefc2808898a459f', class: "input-wrapper", slot: "trigger" }, index.h("slot", { key: 'cea8867cee99035e97bc9ad40a7f20cf1091f415', name: "before-input" }), index.h("div", { key: 'b68a1a7477baaa3fbf39182a36fe4a693e29a688', class: "input-container" }, index.h("slot", { key: '3bb50bb3ad0207ded63bddfff6b5c5afda7ddfd4', name: "leading-input" }), startsWithIgnoreCase(this.format, 'HH') && [
|
|
986
|
-
index.h("input", { key: '236b3a8067f50c443a117e6b3e8e4b882a84eb01', ref: el => (this.inputElements[
|
|
987
|
-
? `${
|
|
988
|
-
:
|
|
986
|
+
index.h("input", { key: '236b3a8067f50c443a117e6b3e8e4b882a84eb01', ref: el => (this.inputElements[constantsA857c476.TimeType.Hours] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.hours, onInput: e => this.handleInputChange(e, constantsA857c476.TimeType.Hours), placeholder: this.format.includes('hh') ? 'hh' : 'HH', inputMode: "numeric", onFocus: () => this.handleFocus(constantsA857c476.TimeType.Hours), name: this.name
|
|
987
|
+
? `${constantsA857c476.TimeType.Hours}-${this.name}`
|
|
988
|
+
: constantsA857c476.TimeType.Hours, id: this.inputId, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
989
989
|
], this.format.includes('mm') && [
|
|
990
990
|
index.h("span", { key: '2440acab80a0d91ebe758f5a329ac5d805a18f9a' }, ":"),
|
|
991
|
-
index.h("input", { key: '72bc71a8bce65be766c899738745d85da7ef3530', ref: el => (this.inputElements[
|
|
992
|
-
? `${
|
|
993
|
-
:
|
|
991
|
+
index.h("input", { key: '72bc71a8bce65be766c899738745d85da7ef3530', ref: el => (this.inputElements[constantsA857c476.TimeType.Minutes] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.minutes, onInput: e => this.handleInputChange(e, constantsA857c476.TimeType.Minutes), placeholder: "mm", inputMode: "numeric", onFocus: () => this.handleFocus(constantsA857c476.TimeType.Minutes), name: this.name
|
|
992
|
+
? `${constantsA857c476.TimeType.Minutes}-${this.name}`
|
|
993
|
+
: constantsA857c476.TimeType.Minutes, id: `${this.inputId}-minutes`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
994
994
|
], this.format.includes('ss') && [
|
|
995
995
|
index.h("span", { key: '0afdff59b999c346b455ed7408332d087ae48b12' }, ":"),
|
|
996
|
-
index.h("input", { key: '0ecf4b18af18b6184e0ccdd00ddea561ee403195', ref: el => (this.inputElements[
|
|
997
|
-
? `${
|
|
998
|
-
:
|
|
996
|
+
index.h("input", { key: '0ecf4b18af18b6184e0ccdd00ddea561ee403195', ref: el => (this.inputElements[constantsA857c476.TimeType.Seconds] = el), type: "number", autofocus: this.autofocus, class: "time-input", pattern: "[0-9]*", maxlength: "3", value: this.seconds, onInput: e => this.handleInputChange(e, constantsA857c476.TimeType.Seconds), placeholder: "ss", inputMode: "numeric", onFocus: () => this.handleFocus(constantsA857c476.TimeType.Seconds), name: this.name
|
|
997
|
+
? `${constantsA857c476.TimeType.Seconds}-${this.name}`
|
|
998
|
+
: constantsA857c476.TimeType.Seconds, id: `${this.inputId}-seconds`, readonly: this.readonly, disabled: this.disabled, required: this.required, onKeyDown: e => this.handleKeyDown(e), onBlur: () => this.handleInputBlur() }),
|
|
999
999
|
], index.h("nv-iconbutton", { key: '2d3d19d683d85110df8aab9d7c70fb377b189381', name: 'clock', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide time picker' : 'Show time picker', "aria-pressed": this.open.toString(), onClick: () => this.HandleDropdownIconClick() }), this.error && (index.h("nv-icon", { key: '8b49cb73821fea8926ede8406019fa68baa8500e', name: "alert-circle", class: "validation", size: "sm" })), this.success && (index.h("nv-icon", { key: '372b8e95455c269a988257f2504fc24c680d7f4b', name: "circle-check", class: "validation", size: "sm" }))), index.h("slot", { key: '9e23fd13862e6218cd7213729b3e165ae74fe2eb', name: "after-input" })), index.h("div", { key: 'c5b99d58c96a055ea8aeade81fb5d75490421716', class: "time-dropdown", slot: "content" }, index.h("div", { key: '2bcee9fa41574db70850445bba4d4041c9471a46', class: "time-columns" }, startsWithIgnoreCase(this.format, 'HH') &&
|
|
1000
|
-
this.RenderTimeOptionsColumn(
|
|
1001
|
-
this.RenderTimeOptionsColumn(
|
|
1002
|
-
this.RenderTimeOptionsColumn(
|
|
1000
|
+
this.RenderTimeOptionsColumn(constantsA857c476.TimeType.Hours), this.format.includes('mm') &&
|
|
1001
|
+
this.RenderTimeOptionsColumn(constantsA857c476.TimeType.Minutes), this.format.includes('ss') &&
|
|
1002
|
+
this.RenderTimeOptionsColumn(constantsA857c476.TimeType.Seconds)))), (this.description ||
|
|
1003
1003
|
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '822534262bb1769294be95c1a240a2753d556e1c', class: "description" }, index.h("slot", { key: '62489b82bee33610b55dfa4c2f9997b5d68b6bfe', name: "description" }, this.description))), (this.errorDescription ||
|
|
1004
1004
|
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '9cedb395a09c4243c7c714574ad8d41b6a836fbb', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '7b8802739ad74756f2843dd8807afe6abda92831', name: "error-description" }, this.errorDescription)))));
|
|
1005
1005
|
}
|