@vonage/vivid 5.31.0 → 5.32.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/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +25 -26
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +5 -5
- package/bundled/char-count.cjs +2 -2
- package/bundled/char-count.js +2 -3
- package/bundled/definition4.cjs +17 -10
- package/bundled/definition4.js +17 -10
- package/bundled/form-element.cjs +1 -1
- package/bundled/form-element.js +3 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +11 -10
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +12 -17
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +7 -9
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +10 -8
- package/bundled/with-error-text.cjs +1 -1
- package/bundled/with-error-text.js +7 -9
- package/custom-elements.json +4955 -6650
- package/lib/accordion-item/accordion-item.d.ts +13 -7
- package/lib/action-group/action-group.d.ts +13 -7
- package/lib/alert/alert.d.ts +26 -14
- package/lib/audio-player/audio-player.d.ts +13 -7
- package/lib/avatar/avatar.d.ts +13 -7
- package/lib/badge/badge.d.ts +13 -7
- package/lib/banner/banner.d.ts +39 -21
- package/lib/breadcrumb/breadcrumb.d.ts +13 -7
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +13 -7
- package/lib/button/button.d.ts +39 -21
- package/lib/calendar-event/calendar-event.d.ts +13 -7
- package/lib/card/card.d.ts +13 -7
- package/lib/checkbox/checkbox.d.ts +84 -48
- package/lib/color-picker/color-picker.d.ts +98 -56
- package/lib/combobox/combobox.d.ts +98 -56
- package/lib/country-group/country-group.d.ts +26 -14
- package/lib/data-grid/data-grid-cell.d.ts +26 -14
- package/lib/data-grid/data-grid-row.d.ts +13 -7
- package/lib/date-picker/date-picker.d.ts +162 -114
- package/lib/date-range-picker/date-range-picker.d.ts +82 -58
- package/lib/date-time-picker/date-time-picker.d.ts +164 -116
- package/lib/dial-pad/dial-pad.d.ts +13 -7
- package/lib/dialog/dialog.d.ts +26 -14
- package/lib/divider/divider.d.ts +13 -7
- package/lib/fab/fab.d.ts +13 -7
- package/lib/file-picker/file-picker.d.ts +98 -56
- package/lib/header/header.d.ts +13 -7
- package/lib/listbox/listbox.d.ts +41 -23
- package/lib/menu/menu.d.ts +30 -18
- package/lib/menu-item/menu-item.d.ts +39 -21
- package/lib/nav/nav.d.ts +13 -7
- package/lib/nav-disclosure/nav-disclosure.d.ts +26 -14
- package/lib/nav-item/nav-item.d.ts +28 -16
- package/lib/note/note.d.ts +13 -7
- package/lib/number-field/number-field.d.ts +124 -70
- package/lib/optgroup/optgroup.d.ts +13 -7
- package/lib/option/option.d.ts +26 -14
- package/lib/pagination/pagination.d.ts +13 -7
- package/lib/popover/popover.d.ts +26 -14
- package/lib/progress/progress.d.ts +13 -7
- package/lib/progress-ring/progress-ring.d.ts +13 -7
- package/lib/radio/radio.d.ts +45 -27
- package/lib/radio-group/radio-group.d.ts +13 -7
- package/lib/range-slider/range-slider.d.ts +40 -22
- package/lib/rich-text-editor/rich-text-editor.d.ts +30 -18
- package/lib/searchable-select/option-tag.d.ts +13 -7
- package/lib/searchable-select/searchable-select.d.ts +124 -70
- package/lib/select/select.d.ts +124 -70
- package/lib/selectable-box/selectable-box.d.ts +13 -7
- package/lib/simple-color-picker/simple-color-picker.d.ts +31 -19
- package/lib/slider/slider.d.ts +39 -21
- package/lib/split-button/split-button.d.ts +39 -21
- package/lib/status/status.d.ts +13 -7
- package/lib/switch/switch.d.ts +26 -14
- package/lib/tab/tab.d.ts +39 -21
- package/lib/tab-panel/tab-panel.d.ts +13 -7
- package/lib/table/table-cell.d.ts +13 -7
- package/lib/table/table-header-cell.d.ts +13 -7
- package/lib/table/table-row.d.ts +13 -7
- package/lib/table/table-sorting-button.d.ts +26 -14
- package/lib/tag/tag.d.ts +39 -21
- package/lib/tag-group/tag-group.d.ts +13 -7
- package/lib/text-area/text-area.d.ts +112 -64
- package/lib/text-field/text-field.d.ts +125 -71
- package/lib/time-picker/time-picker.d.ts +82 -58
- package/lib/toggletip/toggletip.d.ts +30 -18
- package/lib/tooltip/tooltip.d.ts +30 -18
- package/lib/tree-item/tree-item.d.ts +26 -14
- package/lib/tree-view/tree-view.d.ts +13 -7
- package/lib/video-player/video-player.d.ts +13 -7
- package/listbox/index.cjs +1 -1
- package/listbox/index.js +3 -4
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +5 -1
- package/package.json +7 -7
- package/shared/aria/aria-mixin.d.ts +11 -5
- package/shared/aria/delegates-aria.d.ts +13 -7
- package/shared/aria/host-semantics.d.ts +13 -7
- package/shared/color-picker/base-color-picker.d.ts +14 -8
- package/shared/deprecation/replaced-props.d.ts +12 -6
- package/shared/feedback/feedback-message.d.ts +13 -7
- package/shared/feedback/mixins.d.ts +26 -14
- package/shared/foundation/button/button.d.ts +26 -14
- package/shared/foundation/form-associated/form-associated.d.ts +26 -14
- package/shared/foundation/vivid-element/vivid-element.d.ts +35 -17
- package/shared/framework/reactive-controller.d.ts +12 -6
- package/shared/listbox/with-options-filter.d.ts +14 -8
- package/shared/listbox/with-options.d.ts +28 -16
- package/shared/patterns/affix.d.ts +26 -14
- package/shared/patterns/anchored.d.ts +34 -22
- package/shared/patterns/char-count/char-count.d.ts +14 -8
- package/shared/patterns/form-elements/form-element.d.ts +14 -8
- package/shared/patterns/form-elements/with-contextual-help.d.ts +14 -8
- package/shared/patterns/form-elements/with-error-text.d.ts +18 -12
- package/shared/patterns/form-elements/with-success-text.d.ts +13 -7
- package/shared/patterns/kbd-shortcut.d.ts +13 -7
- package/shared/patterns/linkable.d.ts +13 -7
- package/shared/patterns/localized.d.ts +30 -18
- package/shared/patterns/trapped-focus.d.ts +13 -7
- package/shared/picker-field/mixins/calendar-picker.d.ts +41 -29
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +41 -29
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +13 -7
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +41 -29
- package/shared/picker-field/mixins/single-date-picker.d.ts +41 -29
- package/shared/picker-field/mixins/single-value-picker.d.ts +39 -27
- package/shared/picker-field/mixins/time-selection-picker.d.ts +43 -31
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +82 -58
- package/shared/picker-field/picker-field.d.ts +98 -57
- package/unbundled/anchored.cjs +39 -37
- package/unbundled/anchored.js +39 -37
- package/unbundled/calendar-picker.template.cjs +7 -5
- package/unbundled/calendar-picker.template.js +7 -5
- package/unbundled/char-count.cjs +3 -9
- package/unbundled/char-count.js +3 -9
- package/unbundled/definition5.cjs +17 -10
- package/unbundled/definition5.js +17 -10
- package/unbundled/definition50.cjs +3 -4
- package/unbundled/definition50.js +3 -4
- package/unbundled/definition52.cjs +6 -2
- package/unbundled/definition52.js +6 -2
- package/unbundled/form-element.cjs +3 -4
- package/unbundled/form-element.js +3 -4
- package/unbundled/localized.cjs +15 -11
- package/unbundled/localized.js +15 -11
- package/unbundled/picker-field.template.cjs +22 -24
- package/unbundled/picker-field.template.js +22 -24
- package/unbundled/time-selection-picker.template.cjs +10 -10
- package/unbundled/time-selection-picker.template.js +10 -10
- package/unbundled/vivid-element.cjs +12 -8
- package/unbundled/vivid-element.js +12 -8
- package/unbundled/with-error-text.cjs +11 -10
- package/unbundled/with-error-text.js +11 -10
- package/shared/foundation/vivid-element/vivid-element.browser-spec.d.ts +0 -1
package/bundled/localized.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));const u=require("./vivid-element.cjs"),d=require("./decorate.cjs");var f=s({Background:()=>I,Black:()=>A,Blue:()=>M,Captions:()=>w,Casual:()=>W,Chapters:()=>T,Close:()=>D,Color:()=>J,Cyan:()=>F,Depressed:()=>H,Descriptions:()=>E,Done:()=>q,Duration:()=>g,Fullscreen:()=>b,Green:()=>j,LIVE:()=>_,Loaded:()=>v,Magenta:()=>P,Mute:()=>x,None:()=>B,Opacity:()=>Y,Opaque:()=>z,Pause:()=>m,Play:()=>p,Progress:()=>y,Raised:()=>V,Red:()=>`Red`,Replay:()=>h,Reset:()=>K,Script:()=>G,Subtitles:()=>C,Text:()=>O,Transparent:()=>R,Uniform:()=>U,Unmute:()=>S,White:()=>k,Window:()=>L,Yellow:()=>N,default:()=>ee}),p=`Play`,m=`Pause`,h=`Replay`,g=`Duration`,_=`LIVE`,v=`Loaded`,y=`Progress`,b=`Fullscreen`,x=`Mute`,S=`Unmute`,C=`Subtitles`,w=`Captions`,T=`Chapters`,E=`Descriptions`,D=`Close`,O=`Text`,k=`White`,A=`Black`,j=`Green`,M=`Blue`,N=`Yellow`,P=`Magenta`,F=`Cyan`,I=`Background`,L=`Window`,R=`Transparent`,z=`Opaque`,B=`None`,V=`Raised`,H=`Depressed`,U=`Uniform`,W=`Casual`,G=`Script`,K=`Reset`,q=`Done`,J=`Color`,Y=`Opacity`,ee={"Audio Player":`Audio Player`,"Video Player":`Video Player`,Play:p,Pause:m,Replay:h,"Current Time":`Current Time`,Duration:g,"Remaining Time":`Remaining Time`,"Stream Type":`Stream Type`,LIVE:_,"Seek to live, currently behind live":`Seek to live, currently behind live`,"Seek to live, currently playing live":`Seek to live, currently playing live`,Loaded:v,Progress:y,"Progress Bar":`Progress Bar`,"progress bar timing: currentTime={1} duration={2}":`{1} of {2}`,Fullscreen:b,"Exit Fullscreen":`Exit Fullscreen`,Mute:x,Unmute:S,"Playback Rate":`Playback Rate`,Subtitles:C,"subtitles off":`subtitles off`,Captions:w,"captions off":`captions off`,Chapters:T,Descriptions:E,"descriptions off":`descriptions off`,"Audio Track":`Audio Track`,"Volume Level":`Volume Level`,"You aborted the media playback":`You aborted the media playback`,"A network error caused the media download to fail part-way.":`A network error caused the media download to fail part-way.`,"The media could not be loaded, either because the server or network failed or because the format is not supported.":`The media could not be loaded, either because the server or network failed or because the format is not supported.`,"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":`The media playback was aborted due to a corruption problem or because the media used features your browser did not support.`,"No compatible source was found for this media.":`No compatible source was found for this media.`,"The media is encrypted and we do not have the keys to decrypt it.":`The media is encrypted and we do not have the keys to decrypt it.`,"Play Video":`Play Video`,Close:D,"Close Modal Dialog":`Close Modal Dialog`,"Modal Window":`Modal Window`,"This is a modal window":`This is a modal window`,"This modal can be closed by pressing the Escape key or activating the close button.":`This modal can be closed by pressing the Escape key or activating the close button.`,", opens captions settings dialog":`, opens captions settings dialog`,", opens subtitles settings dialog":`, opens subtitles settings dialog`,", opens descriptions settings dialog":`, opens descriptions settings dialog`,", selected":`, selected`,"captions settings":`captions settings`,"subtitles settings":`subtitles settings`,"descriptions settings":`descriptions settings`,Text:O,White:k,Black:A,Red:`Red`,Green:j,Blue:M,Yellow:N,Magenta:P,Cyan:F,Background:I,Window:L,Transparent:R,"Semi-Transparent":`Semi-Transparent`,Opaque:z,"Font Size":`Font Size`,"Text Edge Style":`Text Edge Style`,None:B,Raised:V,Depressed:H,Uniform:U,"Drop shadow":`Drop shadow`,"Font Family":`Font Family`,"Proportional Sans-Serif":`Proportional Sans-Serif`,"Monospace Sans-Serif":`Monospace Sans-Serif`,"Proportional Serif":`Proportional Serif`,"Monospace Serif":`Monospace Serif`,Casual:W,Script:G,"Small Caps":`Small Caps`,Reset:K,"restore all settings to the default values":`restore all settings to the default values`,Done:q,"Caption Settings Dialog":`Caption Settings Dialog`,"Beginning of dialog window. Escape will cancel and close the window.":`Beginning of dialog window. Escape will cancel and close the window.`,"End of dialog window.":`End of dialog window.`,"{1} is loading.":`{1} is loading.`,"Exit Picture-in-Picture":`Exit Picture-in-Picture`,"Picture-in-Picture":`Picture-in-Picture`,"No content":`No content`,Color:J,Opacity:Y,"Text Background":`Text Background`,"Caption Area Background":`Caption Area Background`,"Playing in Picture-in-Picture":`Playing in Picture-in-Picture`,"Skip backward {1} seconds":`Skip backward {1} seconds`,"Skip forward {1} seconds":`Skip forward {1} seconds`},X={lang:`en-US`,common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:`Clear`,okLabel:`OK`},calendarPicker:{months:{name:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shorthand:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]},weekdays:{name:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shorthand:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},firstDayOfWeek:0,dateFormat:`MM/dd/yyyy`,dateFormatPlaceholder:`MM/DD/YYYY`,chooseDateLabel:`Choose date`,changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:`Choose dates`,changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:`Previous year`,prevMonthLabel:`Previous month`,nextMonthLabel:`Next month`,nextYearLabel:`Next year`,todayLabel:`today`,selectedLabel:`selected`,currentLabel:`current`,changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:`Please enter a valid date.`,invalidDateRangeError:`Please enter a valid date range.`,startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:`Choose time`,changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:`hours`,minutesLabel:`minutes`,secondsLabel:`seconds`,meridiesLabel:`AM/PM`,invalidTimeError:`Please enter a valid time.`},dateTimePicker:{chooseDateTimeLabel:`Choose date and time`,changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:`Please enter a valid date and time.`,dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:`You can't select files of this type.`,maxFilesExceededError:`You can't select any more files.`,fileTooBigError:`File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.`,removeFileLabel:`Remove file`,invalidFilesError:`One or more selected files are invalid. Please, upload only valid file types under the size limit.`,uploadFilesLabel:`Upload files`},audioPlayer:{playButtonLabel:`Play`,pauseButtonLabel:`Pause`,sliderLabel:`Audio progress bar`,skipForwardButton:`Skip Forward`,skipBackwardButton:`Skip Backward`},alert:{dismissButtonLabel:`Close`},dialog:{dismissButtonLabel:`Close`},popover:{dismissButtonLabel:`Close`},banner:{dismissButtonLabel:`Close`},numberField:{incrementButtonLabel:e=>e===1?`Increase value`:`Increase value by ${e}`,decrementButtonLabel:e=>e===1?`Decrease value`:`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:`Show more actions`},videoPlayer:f,rangeSlider:{startThumbLabel:`min`,endThumbLabel:`max`},dialPad:{inputLabel:`Phone number`,deleteButtonLabel:`Delete last digit`,callButtonLabel:`Call`,endCallButtonLabel:`End call`,digitOneLabel:`1`,digitTwoLabel:`2 ABC`,digitThreeLabel:`3 DEF`,digitFourLabel:`4 GHI`,digitFiveLabel:`5 JKL`,digitSixLabel:`6 MNO`,digitSevenLabel:`7 PQRS`,digitEightLabel:`8 TUV`,digitNineLabel:`9 WXYZ`,digitAsteriskLabel:`Asterisk`,digitZeroLabel:`0`,digitZeroDescription:`Press and hold to type a plus sign`,digitHashtagLabel:`Pound`,errorLabel:`Error:`},tab:{dismissButtonLabel:`Press the DELETE key to close this tab`},select:{clearButtonLabel:`Clear selection`},countryGroup:{ariaLabelPrefix:`Countries:`},searchableSelect:{clearButtonLabel:`Clear selection`,noOptionsMessage:`No options`,noMatchesMessage:`No options found`,selectAllLabel:`Select All`,deselectAllLabel:`Deselect All`,selectedAllMessage:`All options selected`,deselectedAllMessage:`All options deselected`,loadingOptionsMessage:`Loading...`,removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,t,n,r)=>`Option ${e} focused, ${r?`selected, `:``}${t} of ${n}.`,maxSelectedMessage:(e,t)=>`${e} of ${t} selected.`},richTextEditor:{paragraphStyles:`Paragraph styles`,textSize:`Text size`,bold:`Bold`,italic:`Italic`,underline:`Underline`,strikethrough:`Strikethrough`,monospace:`Monospace`,textColor:`Text color`,undo:`Undo`,redo:`Redo`,bulletList:`Bullet list`,numberedList:`Numbered list`,alignment:`Alignment`,alignments:{left:`Left`,center:`Center`,right:`Right`},hyperlink:`Hyperlink`,linkText:`Text`,linkUrl:`URL`,linkTextPlaceholder:`Type text to convert into link`,linkUrlPlaceholder:`Insert link URL`,linkUrlHelperText:`Enter a destination (e.g., https://, mailto:, or tel:).`,cancel:`Cancel`,apply:`Apply`,close:`Close`,edit:`Edit`,delete:`Delete`,imageSizes:{small:`Small`,fit:`Fit`,original:`Original size`},suggestLoading:`Loading...`,suggestNoResults:`No results`},button:{pendingLabel:`Loading...`},feedbackMessage:{errorIconText:`Error:`,successIconText:`Success:`},connotationAnnoncement:{accentIcon:`Accent:`,alertIcon:`Alert:`,informationIcon:`Information:`,successIcon:`Success:`,warningIcon:`Warning:`,announcementIcon:`Announcement:`,ctaIcon:`Call to action:`},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:`Selected`,button:`(button)`,sortStatus:{ascending:`Sorted ascending.`,descending:`Sorted descending.`,none:`Not sorted.`,other:`Custom sort applied.`},sortInstruction:{ascending:`Click to sort descending.`,descending:`Click to un-sort.`,none:`Click to sort ascending.`,other:`Click to reset sorting.`}}},pagination:{previousPageLabel:`Go to previous page`,nextPageLabel:`Go to next page`,goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},tableSortingButton:{sortStatus:{ascending:`Sorted ascending.`,descending:`Sorted descending.`,none:`Not sorted.`},sortInstruction:{ascending:`Click to sort descending.`,descending:`Click to un-sort.`,none:`Click to sort ascending.`}},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:`Show more information`},baseColorPicker:{colorSwatchLabel:(e,t,n)=>{let r=t?`Select ${t}, hex: ${e}`:`Select ${e}`;return n&&(r+=`, selected.`),r}},simpleColorPicker:{colorPaletteLabel:`Color palette`},colorPicker:{popupLabel:`Color Picker`,swatchesLabel:`Saved colors`,pickerButtonLabel:`Color Picker`,hexInputLabel:`HEX color code`,saveButtonLabel:`Save current color`,closeButtonLabel:`Close Color Picker`,copyButtonLabel:`Copy color to clipboard`,copyErrorText:`Copy failed. Clipboard access was blocked. Try again.`,copySuccessMessage:e=>`Color ${e} copied to clipboard.`,selectionSuccessMessage:e=>`Color ${e} selected.`,maxSwatchesMessage:(e,t)=>`${e} of ${t} colors saved.`}},Z=class{constructor(){this.locale=X}};d.t([u.A],Z.prototype,`locale`,void 0);var Q=new Z,$=e=>{class t extends e{get locale(){return Q.locale}}return t},te=e=>{class t extends $(e){localeChanged(){}connectedCallback(){super.connectedCallback(),this.#n()}disconnectedCallback(){super.disconnectedCallback(),this.#r()}#e={handleChange:()=>{this.localeChanged()}};#t;#n(){this.#t=u.k.binding(()=>this.locale,this.#e),this.#t.observe(this,u.O.default)}#r(){this.#t.dispose()}}return t};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));const u=require("./vivid-element.cjs"),d=require("./decorate.cjs");var f=s({Background:()=>I,Black:()=>A,Blue:()=>M,Captions:()=>w,Casual:()=>W,Chapters:()=>T,Close:()=>D,Color:()=>J,Cyan:()=>F,Depressed:()=>H,Descriptions:()=>E,Done:()=>q,Duration:()=>g,Fullscreen:()=>b,Green:()=>j,LIVE:()=>_,Loaded:()=>v,Magenta:()=>P,Mute:()=>x,None:()=>B,Opacity:()=>Y,Opaque:()=>z,Pause:()=>m,Play:()=>p,Progress:()=>y,Raised:()=>V,Red:()=>`Red`,Replay:()=>h,Reset:()=>K,Script:()=>G,Subtitles:()=>C,Text:()=>O,Transparent:()=>R,Uniform:()=>U,Unmute:()=>S,White:()=>k,Window:()=>L,Yellow:()=>N,default:()=>ee}),p=`Play`,m=`Pause`,h=`Replay`,g=`Duration`,_=`LIVE`,v=`Loaded`,y=`Progress`,b=`Fullscreen`,x=`Mute`,S=`Unmute`,C=`Subtitles`,w=`Captions`,T=`Chapters`,E=`Descriptions`,D=`Close`,O=`Text`,k=`White`,A=`Black`,j=`Green`,M=`Blue`,N=`Yellow`,P=`Magenta`,F=`Cyan`,I=`Background`,L=`Window`,R=`Transparent`,z=`Opaque`,B=`None`,V=`Raised`,H=`Depressed`,U=`Uniform`,W=`Casual`,G=`Script`,K=`Reset`,q=`Done`,J=`Color`,Y=`Opacity`,ee={"Audio Player":`Audio Player`,"Video Player":`Video Player`,Play:p,Pause:m,Replay:h,"Current Time":`Current Time`,Duration:g,"Remaining Time":`Remaining Time`,"Stream Type":`Stream Type`,LIVE:_,"Seek to live, currently behind live":`Seek to live, currently behind live`,"Seek to live, currently playing live":`Seek to live, currently playing live`,Loaded:v,Progress:y,"Progress Bar":`Progress Bar`,"progress bar timing: currentTime={1} duration={2}":`{1} of {2}`,Fullscreen:b,"Exit Fullscreen":`Exit Fullscreen`,Mute:x,Unmute:S,"Playback Rate":`Playback Rate`,Subtitles:C,"subtitles off":`subtitles off`,Captions:w,"captions off":`captions off`,Chapters:T,Descriptions:E,"descriptions off":`descriptions off`,"Audio Track":`Audio Track`,"Volume Level":`Volume Level`,"You aborted the media playback":`You aborted the media playback`,"A network error caused the media download to fail part-way.":`A network error caused the media download to fail part-way.`,"The media could not be loaded, either because the server or network failed or because the format is not supported.":`The media could not be loaded, either because the server or network failed or because the format is not supported.`,"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":`The media playback was aborted due to a corruption problem or because the media used features your browser did not support.`,"No compatible source was found for this media.":`No compatible source was found for this media.`,"The media is encrypted and we do not have the keys to decrypt it.":`The media is encrypted and we do not have the keys to decrypt it.`,"Play Video":`Play Video`,Close:D,"Close Modal Dialog":`Close Modal Dialog`,"Modal Window":`Modal Window`,"This is a modal window":`This is a modal window`,"This modal can be closed by pressing the Escape key or activating the close button.":`This modal can be closed by pressing the Escape key or activating the close button.`,", opens captions settings dialog":`, opens captions settings dialog`,", opens subtitles settings dialog":`, opens subtitles settings dialog`,", opens descriptions settings dialog":`, opens descriptions settings dialog`,", selected":`, selected`,"captions settings":`captions settings`,"subtitles settings":`subtitles settings`,"descriptions settings":`descriptions settings`,Text:O,White:k,Black:A,Red:`Red`,Green:j,Blue:M,Yellow:N,Magenta:P,Cyan:F,Background:I,Window:L,Transparent:R,"Semi-Transparent":`Semi-Transparent`,Opaque:z,"Font Size":`Font Size`,"Text Edge Style":`Text Edge Style`,None:B,Raised:V,Depressed:H,Uniform:U,"Drop shadow":`Drop shadow`,"Font Family":`Font Family`,"Proportional Sans-Serif":`Proportional Sans-Serif`,"Monospace Sans-Serif":`Monospace Sans-Serif`,"Proportional Serif":`Proportional Serif`,"Monospace Serif":`Monospace Serif`,Casual:W,Script:G,"Small Caps":`Small Caps`,Reset:K,"restore all settings to the default values":`restore all settings to the default values`,Done:q,"Caption Settings Dialog":`Caption Settings Dialog`,"Beginning of dialog window. Escape will cancel and close the window.":`Beginning of dialog window. Escape will cancel and close the window.`,"End of dialog window.":`End of dialog window.`,"{1} is loading.":`{1} is loading.`,"Exit Picture-in-Picture":`Exit Picture-in-Picture`,"Picture-in-Picture":`Picture-in-Picture`,"No content":`No content`,Color:J,Opacity:Y,"Text Background":`Text Background`,"Caption Area Background":`Caption Area Background`,"Playing in Picture-in-Picture":`Playing in Picture-in-Picture`,"Skip backward {1} seconds":`Skip backward {1} seconds`,"Skip forward {1} seconds":`Skip forward {1} seconds`},X={lang:`en-US`,common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:`Clear`,okLabel:`OK`},calendarPicker:{months:{name:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shorthand:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]},weekdays:{name:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shorthand:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},firstDayOfWeek:0,dateFormat:`MM/dd/yyyy`,dateFormatPlaceholder:`MM/DD/YYYY`,chooseDateLabel:`Choose date`,changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:`Choose dates`,changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:`Previous year`,prevMonthLabel:`Previous month`,nextMonthLabel:`Next month`,nextYearLabel:`Next year`,todayLabel:`today`,selectedLabel:`selected`,currentLabel:`current`,changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:`Please enter a valid date.`,invalidDateRangeError:`Please enter a valid date range.`,startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:`Choose time`,changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:`hours`,minutesLabel:`minutes`,secondsLabel:`seconds`,meridiesLabel:`AM/PM`,invalidTimeError:`Please enter a valid time.`},dateTimePicker:{chooseDateTimeLabel:`Choose date and time`,changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:`Please enter a valid date and time.`,dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:`You can't select files of this type.`,maxFilesExceededError:`You can't select any more files.`,fileTooBigError:`File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.`,removeFileLabel:`Remove file`,invalidFilesError:`One or more selected files are invalid. Please, upload only valid file types under the size limit.`,uploadFilesLabel:`Upload files`},audioPlayer:{playButtonLabel:`Play`,pauseButtonLabel:`Pause`,sliderLabel:`Audio progress bar`,skipForwardButton:`Skip Forward`,skipBackwardButton:`Skip Backward`},alert:{dismissButtonLabel:`Close`},dialog:{dismissButtonLabel:`Close`},popover:{dismissButtonLabel:`Close`},banner:{dismissButtonLabel:`Close`},numberField:{incrementButtonLabel:e=>e===1?`Increase value`:`Increase value by ${e}`,decrementButtonLabel:e=>e===1?`Decrease value`:`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:`Show more actions`},videoPlayer:f,rangeSlider:{startThumbLabel:`min`,endThumbLabel:`max`},dialPad:{inputLabel:`Phone number`,deleteButtonLabel:`Delete last digit`,callButtonLabel:`Call`,endCallButtonLabel:`End call`,digitOneLabel:`1`,digitTwoLabel:`2 ABC`,digitThreeLabel:`3 DEF`,digitFourLabel:`4 GHI`,digitFiveLabel:`5 JKL`,digitSixLabel:`6 MNO`,digitSevenLabel:`7 PQRS`,digitEightLabel:`8 TUV`,digitNineLabel:`9 WXYZ`,digitAsteriskLabel:`Asterisk`,digitZeroLabel:`0`,digitZeroDescription:`Press and hold to type a plus sign`,digitHashtagLabel:`Pound`,errorLabel:`Error:`},tab:{dismissButtonLabel:`Press the DELETE key to close this tab`},select:{clearButtonLabel:`Clear selection`},countryGroup:{ariaLabelPrefix:`Countries:`},searchableSelect:{clearButtonLabel:`Clear selection`,noOptionsMessage:`No options`,noMatchesMessage:`No options found`,selectAllLabel:`Select All`,deselectAllLabel:`Deselect All`,selectedAllMessage:`All options selected`,deselectedAllMessage:`All options deselected`,loadingOptionsMessage:`Loading...`,removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,t,n,r)=>`Option ${e} focused, ${r?`selected, `:``}${t} of ${n}.`,maxSelectedMessage:(e,t)=>`${e} of ${t} selected.`},richTextEditor:{paragraphStyles:`Paragraph styles`,textSize:`Text size`,bold:`Bold`,italic:`Italic`,underline:`Underline`,strikethrough:`Strikethrough`,monospace:`Monospace`,textColor:`Text color`,undo:`Undo`,redo:`Redo`,bulletList:`Bullet list`,numberedList:`Numbered list`,alignment:`Alignment`,alignments:{left:`Left`,center:`Center`,right:`Right`},hyperlink:`Hyperlink`,linkText:`Text`,linkUrl:`URL`,linkTextPlaceholder:`Type text to convert into link`,linkUrlPlaceholder:`Insert link URL`,linkUrlHelperText:`Enter a destination (e.g., https://, mailto:, or tel:).`,cancel:`Cancel`,apply:`Apply`,close:`Close`,edit:`Edit`,delete:`Delete`,imageSizes:{small:`Small`,fit:`Fit`,original:`Original size`},suggestLoading:`Loading...`,suggestNoResults:`No results`},button:{pendingLabel:`Loading...`},feedbackMessage:{errorIconText:`Error:`,successIconText:`Success:`},connotationAnnoncement:{accentIcon:`Accent:`,alertIcon:`Alert:`,informationIcon:`Information:`,successIcon:`Success:`,warningIcon:`Warning:`,announcementIcon:`Announcement:`,ctaIcon:`Call to action:`},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:`Selected`,button:`(button)`,sortStatus:{ascending:`Sorted ascending.`,descending:`Sorted descending.`,none:`Not sorted.`,other:`Custom sort applied.`},sortInstruction:{ascending:`Click to sort descending.`,descending:`Click to un-sort.`,none:`Click to sort ascending.`,other:`Click to reset sorting.`}}},pagination:{previousPageLabel:`Go to previous page`,nextPageLabel:`Go to next page`,goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},tableSortingButton:{sortStatus:{ascending:`Sorted ascending.`,descending:`Sorted descending.`,none:`Not sorted.`},sortInstruction:{ascending:`Click to sort descending.`,descending:`Click to un-sort.`,none:`Click to sort ascending.`}},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:`Show more information`},baseColorPicker:{colorSwatchLabel:(e,t,n)=>{let r=t?`Select ${t}, hex: ${e}`:`Select ${e}`;return n&&(r+=`, selected.`),r}},simpleColorPicker:{colorPaletteLabel:`Color palette`},colorPicker:{popupLabel:`Color Picker`,swatchesLabel:`Saved colors`,pickerButtonLabel:`Color Picker`,hexInputLabel:`HEX color code`,saveButtonLabel:`Save current color`,closeButtonLabel:`Close Color Picker`,copyButtonLabel:`Copy color to clipboard`,copyErrorText:`Copy failed. Clipboard access was blocked. Try again.`,copySuccessMessage:e=>`Color ${e} copied to clipboard.`,selectionSuccessMessage:e=>`Color ${e} selected.`,maxSwatchesMessage:(e,t)=>`${e} of ${t} colors saved.`}},Z=class{constructor(){this.locale=X}};d.t([u.A],Z.prototype,`locale`,void 0);var Q=new Z,$=e=>{class t extends e{get locale(){return Q.locale}}return t},te=e=>{class t extends $(e){constructor(...e){super(...e),this._localeChangeHandler={handleChange:()=>{this.localeChanged()}}}localeChanged(){}connectedCallback(){super.connectedCallback(),this._startObservingLocaleChanges()}disconnectedCallback(){super.disconnectedCallback(),this._stopObservingLocaleChanges()}_startObservingLocaleChanges(){this._localeChangeObserver=u.k.binding(()=>this.locale,this._localeChangeHandler),this._localeChangeObserver.observe(this,u.O.default)}_stopObservingLocaleChanges(){this._localeChangeObserver.dispose()}}return t};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
package/bundled/localized.js
CHANGED
|
@@ -443,23 +443,24 @@ var ne = new Q(), $ = (e) => {
|
|
|
443
443
|
return t;
|
|
444
444
|
}, re = (e) => {
|
|
445
445
|
class r extends $(e) {
|
|
446
|
+
constructor(...e) {
|
|
447
|
+
super(...e), this._localeChangeHandler = { handleChange: () => {
|
|
448
|
+
this.localeChanged();
|
|
449
|
+
} };
|
|
450
|
+
}
|
|
446
451
|
/* v8 ignore next */
|
|
447
452
|
localeChanged() {}
|
|
448
453
|
connectedCallback() {
|
|
449
|
-
super.connectedCallback(), this
|
|
454
|
+
super.connectedCallback(), this._startObservingLocaleChanges();
|
|
450
455
|
}
|
|
451
456
|
disconnectedCallback() {
|
|
452
|
-
super.disconnectedCallback(), this
|
|
457
|
+
super.disconnectedCallback(), this._stopObservingLocaleChanges();
|
|
453
458
|
}
|
|
454
|
-
|
|
455
|
-
this.
|
|
456
|
-
} };
|
|
457
|
-
#t;
|
|
458
|
-
#n() {
|
|
459
|
-
this.#t = n.binding(() => this.locale, this.#e), this.#t.observe(this, t.default);
|
|
459
|
+
_startObservingLocaleChanges() {
|
|
460
|
+
this._localeChangeObserver = n.binding(() => this.locale, this._localeChangeHandler), this._localeChangeObserver.observe(this, t.default);
|
|
460
461
|
}
|
|
461
|
-
|
|
462
|
-
this
|
|
462
|
+
_stopObservingLocaleChanges() {
|
|
463
|
+
this._localeChangeObserver.dispose();
|
|
463
464
|
}
|
|
464
465
|
}
|
|
465
466
|
return r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./localized.cjs"),t=require("./vivid-element.cjs"),n=require("./slotted.cjs"),r=require("./ref.cjs"),i=require("./decorate.cjs"),a=require("./class-names.cjs"),o=require("./component-enum.cjs"),s=require("./form-associated.cjs"),c=require("./definition5.cjs"),l=require("./definition7.cjs"),u=require("./dialog.cjs"),d=require("./form-element.cjs"),f=require("./with-contextual-help.cjs"),p=require("./with-error-text.cjs"),m=require("./mixins.cjs"),h=require("./definition11.cjs"),g=require("./trapped-focus.cjs");var _=`:host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.picker-button-icon[disabled],.picker-button-icon[readonly]{--_picker-field-disabled-icon-color:var(--vvd-color-neutral-600)}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}`,v=o.t([`fieldset`,`ghost`],`fieldset`),y=class extends f.t(m.t(p.t(d.t(g.t(e.t(s.n(t.t))))))){readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}constructor(){super(),this.readOnly=!1,this
|
|
1
|
+
const e=require("./localized.cjs"),t=require("./vivid-element.cjs"),n=require("./slotted.cjs"),r=require("./ref.cjs"),i=require("./decorate.cjs"),a=require("./class-names.cjs"),o=require("./component-enum.cjs"),s=require("./form-associated.cjs"),c=require("./definition5.cjs"),l=require("./definition7.cjs"),u=require("./dialog.cjs"),d=require("./form-element.cjs"),f=require("./with-contextual-help.cjs"),p=require("./with-error-text.cjs"),m=require("./mixins.cjs"),h=require("./definition11.cjs"),g=require("./trapped-focus.cjs");var _=`:host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.picker-button-icon[disabled],.picker-button-icon[readonly]{--_picker-field-disabled-icon-color:var(--vvd-color-neutral-600)}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}`,v=o.t([`fieldset`,`ghost`],`fieldset`),y=class extends f.t(m.t(p.t(d.t(g.t(e.t(s.n(t.t))))))){readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}constructor(){super(),this.readOnly=!1,this._onFocusIn=()=>{this.$emit(`focus`,void 0,{bubbles:!1})},this._onFocusOut=()=>{this.$emit(`blur`,void 0,{bubbles:!1})},this.proxy=document.createElement(`input`),this._localeChangeHandler={handleChange:()=>{this._updatePresentationValue()}},this._popupOpen=!1,this._dismissOnClickOutside=e=>{if(!this._popupOpen)return;let t=e.composedPath();[this._dialogEl,this._pickerButtonEl].some(e=>t.includes(e))||this._closePopup(!1)},this._presentationValue=``,this.value=``}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this._dismissOnClickOutside),this.addEventListener(`focusin`,this._onFocusIn),this.addEventListener(`focusout`,this._onFocusOut),this._startObservingLocaleChanges()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this._dismissOnClickOutside),this.removeEventListener(`focusin`,this._onFocusIn),this.removeEventListener(`focusout`,this._onFocusOut),this._stopObservingLocaleChanges()}validate(){this.proxy&&this.proxy.setCustomValidity(this._getCustomValidationError()??``),super.validate(this._textFieldEl?.querySelector(`input`)??void 0)}_startObservingLocaleChanges(){this._localeChangeObserver=t.k.binding(()=>this.locale,this._localeChangeHandler),this._localeChangeObserver.observe(this,t.O.default)}_stopObservingLocaleChanges(){this._localeChangeObserver.dispose()}_openPopupIfPossible(){this.readOnly||(this._popupOpen=!0)}_closePopup(e=!0){this._popupOpen=!1,e&&this._textFieldEl.focus()}_onBaseKeyDown(e){return this._popupOpen&&u.t(e)?(this._closePopup(),!1):!this._trappedFocus(e,()=>this._focusableElsWithinDialog())}_presentationValueChanged(){this.dirtyValue=!0,this.validate()}_onTextFieldInput(e){let t=e.currentTarget;this._presentationValue=t.value}_onPickerButtonClick(){this._popupOpen?this._closePopup():this._openPopupIfPossible()}_onOkClick(){this._closePopup()}_onClearClick(){this.$emit(`clear-click`)}};i.t([t.m()],y.prototype,`scale`,void 0),i.t([t.m({attribute:`readonly`,mode:`boolean`})],y.prototype,`readOnly`,void 0),i.t([t.m],y.prototype,`appearance`,void 0),i.t([t.A],y.prototype,`_popupOpen`,void 0),i.t([t.A],y.prototype,`_presentationValue`,void 0);var b=(e,i,{withSeparator:o,padded:s})=>{let u=e.tagFor(l.i),d=e.tagFor(h.r),f=e.tagFor(c.i);return t.p`
|
|
2
2
|
<div class='base' @keydown='${(e,{event:t})=>e._onBaseKeyDown(t)}'>
|
|
3
3
|
<${d} id='text-field'
|
|
4
4
|
${r.t(`_textFieldEl`)}
|
|
@@ -21,39 +21,34 @@ var S = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}
|
|
|
21
21
|
this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly, this.validate());
|
|
22
22
|
}
|
|
23
23
|
constructor() {
|
|
24
|
-
super(), this.readOnly = !1, this
|
|
24
|
+
super(), this.readOnly = !1, this._onFocusIn = () => {
|
|
25
25
|
this.$emit("focus", void 0, { bubbles: !1 });
|
|
26
|
-
}, this
|
|
26
|
+
}, this._onFocusOut = () => {
|
|
27
27
|
this.$emit("blur", void 0, { bubbles: !1 });
|
|
28
|
-
}, this.proxy = document.createElement("input"), this
|
|
28
|
+
}, this.proxy = document.createElement("input"), this._localeChangeHandler = { handleChange: () => {
|
|
29
29
|
this._updatePresentationValue();
|
|
30
|
-
} }, this._popupOpen = !1, this
|
|
30
|
+
} }, this._popupOpen = !1, this._dismissOnClickOutside = (e) => {
|
|
31
31
|
if (!this._popupOpen) return;
|
|
32
32
|
let t = e.composedPath();
|
|
33
33
|
[this._dialogEl, this._pickerButtonEl].some((e) => t.includes(e)) || this._closePopup(!1);
|
|
34
34
|
}, this._presentationValue = "", this.value = "";
|
|
35
35
|
}
|
|
36
36
|
connectedCallback() {
|
|
37
|
-
super.connectedCallback(), document.addEventListener("click", this
|
|
37
|
+
super.connectedCallback(), document.addEventListener("click", this._dismissOnClickOutside), this.addEventListener("focusin", this._onFocusIn), this.addEventListener("focusout", this._onFocusOut), this._startObservingLocaleChanges();
|
|
38
38
|
}
|
|
39
39
|
disconnectedCallback() {
|
|
40
|
-
super.disconnectedCallback(), document.removeEventListener("click", this
|
|
40
|
+
super.disconnectedCallback(), document.removeEventListener("click", this._dismissOnClickOutside), this.removeEventListener("focusin", this._onFocusIn), this.removeEventListener("focusout", this._onFocusOut), this._stopObservingLocaleChanges();
|
|
41
41
|
}
|
|
42
|
-
#e;
|
|
43
|
-
#t;
|
|
44
42
|
validate() {
|
|
45
43
|
this.proxy && this.proxy.setCustomValidity(this._getCustomValidationError() ?? ""), super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
|
|
46
44
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
#i() {
|
|
50
|
-
this.#r = r.binding(() => this.locale, this.#n), this.#r.observe(this, n.default);
|
|
45
|
+
_startObservingLocaleChanges() {
|
|
46
|
+
this._localeChangeObserver = r.binding(() => this.locale, this._localeChangeHandler), this._localeChangeObserver.observe(this, n.default);
|
|
51
47
|
}
|
|
52
|
-
|
|
53
|
-
this
|
|
48
|
+
_stopObservingLocaleChanges() {
|
|
49
|
+
this._localeChangeObserver.dispose();
|
|
54
50
|
}
|
|
55
|
-
|
|
56
|
-
#s() {
|
|
51
|
+
_openPopupIfPossible() {
|
|
57
52
|
/* v8 ignore else -- @preserve */
|
|
58
53
|
this.readOnly || (this._popupOpen = !0);
|
|
59
54
|
}
|
|
@@ -71,7 +66,7 @@ var S = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}
|
|
|
71
66
|
this._presentationValue = t.value;
|
|
72
67
|
}
|
|
73
68
|
_onPickerButtonClick() {
|
|
74
|
-
this._popupOpen ? this._closePopup() : this
|
|
69
|
+
this._popupOpen ? this._closePopup() : this._openPopupIfPossible();
|
|
75
70
|
}
|
|
76
71
|
_onOkClick() {
|
|
77
72
|
this._closePopup();
|
|
@@ -27,7 +27,7 @@ const e=require("./localized.cjs"),t=require("./vivid-element.cjs"),n=require(".
|
|
|
27
27
|
${N(S)} ${N(C)}
|
|
28
28
|
${i.t(E,N(w))}
|
|
29
29
|
${i.t(D,N(T))}
|
|
30
|
-
</div>`,F=class extends e.t(t.t){constructor(...e){super(...e),this.minutesStep=1,this.clock=`24h`,this.focusedPickerClass=`focused`,this._onFocusOut=()=>{this._clearFocusedClasses()},this._onPointerDown=()=>{this._clearFocusedClasses()}}valueChanged(e,t){t!==void 0&&!d(t)&&(this.value=void 0)}scrollSelectedOptionsToTop(){S.getSelectedOptionValue(this)&&A(this,`hours`,S.getSelectedOptionValue(this),`start`),C.getSelectedOptionValue(this)&&A(this,`minutes`,C.getSelectedOptionValue(this),`start`),E(this)&&w.getSelectedOptionValue(this)&&A(this,`seconds`,w.getSelectedOptionValue(this),`start`),D(this)&&T.getSelectedOptionValue(this)&&A(this,`meridies`,T.getSelectedOptionValue(this),`start`)}focus(e){this.shadowRoot.querySelector(`.picker`).focus(e),this._applyFocusedClass()}_applyFocusedClass(){let e=this.shadowRoot.querySelectorAll(`.picker`);requestAnimationFrame(()=>{let t=this.shadowRoot.activeElement;e.forEach(e=>{e===t?e.parentElement?.classList.add(this.focusedPickerClass):e.parentElement?.classList.remove(this.focusedPickerClass)})})}_clearFocusedClasses(){this.shadowRoot.querySelectorAll(`.picker`).forEach(e=>{e.parentElement?.classList.remove(this.focusedPickerClass)})}};a.t([t.A],F.prototype,`value`,void 0),a.t([t.A],F.prototype,`minutesStep`,void 0),a.t([t.A],F.prototype,`secondsStep`,void 0),a.t([t.A],F.prototype,`clock`,void 0),a.t([t.A],F.prototype,`min`,void 0),a.t([t.A],F.prototype,`max`,void 0);var I=t.u(`inline-time-picker`,F,P,[],{styles:`:host{display:inline-block}.time-pickers{block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));justify-content:center;gap:4px;padding:4px;display:flex;overflow:hidden}.time-pickers .picker-wrapper{border-radius:4px;flex-direction:column;display:flex;position:relative}.time-pickers .picker-wrapper.focused:has(.picker:focus-visible){--focus-stroke-gap-color:transparent;--focus-inset:-2px;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}.time-pickers .picker{scrollbar-width:none;border-radius:4px;flex-direction:column;gap:4px;inline-size:50px;margin:0 -4px;padding:0 4px;list-style:none;display:flex;position:relative;overflow:hidden scroll}@media (hover:hover){.time-pickers .picker:hover{scrollbar-width:auto}}.time-pickers .picker:after{block-size:calc(28px * (var(--_inline-time-picker-num-options-visible) - 1) + 4px * (var(--_inline-time-picker-num-options-visible) - 1 - 1));content:"";flex-shrink:0;display:block}.time-pickers .picker:focus-visible{outline:none}.time-pickers .option{background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;inline-size:50px;display:flex}.time-pickers .picker-wrapper:not(.focused) .picker:focus-visible .option.selected{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}`,shadowOptions:{delegatesFocus:!0}});t.d(I);var L=e=>{class n extends e{constructor(...e){super(...e),this.minutesStep=null,this.secondsStep=null,this
|
|
30
|
+
</div>`,F=class extends e.t(t.t){constructor(...e){super(...e),this.minutesStep=1,this.clock=`24h`,this.focusedPickerClass=`focused`,this._onFocusOut=()=>{this._clearFocusedClasses()},this._onPointerDown=()=>{this._clearFocusedClasses()}}valueChanged(e,t){t!==void 0&&!d(t)&&(this.value=void 0)}scrollSelectedOptionsToTop(){S.getSelectedOptionValue(this)&&A(this,`hours`,S.getSelectedOptionValue(this),`start`),C.getSelectedOptionValue(this)&&A(this,`minutes`,C.getSelectedOptionValue(this),`start`),E(this)&&w.getSelectedOptionValue(this)&&A(this,`seconds`,w.getSelectedOptionValue(this),`start`),D(this)&&T.getSelectedOptionValue(this)&&A(this,`meridies`,T.getSelectedOptionValue(this),`start`)}focus(e){this.shadowRoot.querySelector(`.picker`).focus(e),this._applyFocusedClass()}_applyFocusedClass(){let e=this.shadowRoot.querySelectorAll(`.picker`);requestAnimationFrame(()=>{let t=this.shadowRoot.activeElement;e.forEach(e=>{e===t?e.parentElement?.classList.add(this.focusedPickerClass):e.parentElement?.classList.remove(this.focusedPickerClass)})})}_clearFocusedClasses(){this.shadowRoot.querySelectorAll(`.picker`).forEach(e=>{e.parentElement?.classList.remove(this.focusedPickerClass)})}};a.t([t.A],F.prototype,`value`,void 0),a.t([t.A],F.prototype,`minutesStep`,void 0),a.t([t.A],F.prototype,`secondsStep`,void 0),a.t([t.A],F.prototype,`clock`,void 0),a.t([t.A],F.prototype,`min`,void 0),a.t([t.A],F.prototype,`max`,void 0);var I=t.u(`inline-time-picker`,F,P,[],{styles:`:host{display:inline-block}.time-pickers{block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));justify-content:center;gap:4px;padding:4px;display:flex;overflow:hidden}.time-pickers .picker-wrapper{border-radius:4px;flex-direction:column;display:flex;position:relative}.time-pickers .picker-wrapper.focused:has(.picker:focus-visible){--focus-stroke-gap-color:transparent;--focus-inset:-2px;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}.time-pickers .picker{scrollbar-width:none;border-radius:4px;flex-direction:column;gap:4px;inline-size:50px;margin:0 -4px;padding:0 4px;list-style:none;display:flex;position:relative;overflow:hidden scroll}@media (hover:hover){.time-pickers .picker:hover{scrollbar-width:auto}}.time-pickers .picker:after{block-size:calc(28px * (var(--_inline-time-picker-num-options-visible) - 1) + 4px * (var(--_inline-time-picker-num-options-visible) - 1 - 1));content:"";flex-shrink:0;display:block}.time-pickers .picker:focus-visible{outline:none}.time-pickers .option{background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;inline-size:50px;display:flex}.time-pickers .picker-wrapper:not(.focused) .picker:focus-visible .option.selected{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}`,shadowOptions:{delegatesFocus:!0}});t.d(I);var L=e=>{class n extends e{constructor(...e){super(...e),this.minutesStep=null,this.secondsStep=null,this._clockChangeHandler={handleChange:()=>{this.value&&(this._presentationValue=this._toPresentationValue(this.value))}}}get _displaySeconds(){return this.secondsStep!==null}get _use12hClock(){return this.clock?this.clock===`12h`:this.locale.timePicker.defaultTo12HourClock}get _timePlaceholder(){let e=`hh:mm`;return this._displaySeconds&&(e+=`:ss`),this._use12hClock&&(e+=` aa`),e}_startObservingClockChanges(){this._clockChangeObserver=t.k.binding(()=>this._use12hClock,this._clockChangeHandler),this._clockChangeObserver.observe(this,t.O.default)}_stopObservingClockChanges(){this._clockChangeObserver.dispose()}connectedCallback(){super.connectedCallback(),this._startObservingClockChanges()}disconnectedCallback(){super.disconnectedCallback(),this._stopObservingClockChanges()}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(t.M.process(),this._inlineTimePickerEl.scrollSelectedOptionsToTop())}_onInlineTimePickerChange(e){this._updateValueDueToUserInteraction(this._withUpdatedTime(e.detail),!1)}_onInlineTimePickerLastColumnSelected(){this._closePopup()}}return a.t([t.m({attribute:`minutes-step`,converter:t.h})],n.prototype,`minutesStep`,void 0),a.t([t.m({attribute:`seconds-step`,converter:t.h})],n.prototype,`secondsStep`,void 0),a.t([t.m],n.prototype,`clock`,void 0),a.t([t.j],n.prototype,`_use12hClock`,null),n},R=(e,t,n)=>{let r=m(e),i=`${p(n?g(r.hours):r.hours)}:${r.minuteStr}`;return t&&(i+=`:${r.secondStr}`),n&&(i+=` ${r.meridiem}`),i},z=e=>e>=`0`&&e<=`9`,B=(e,t)=>{let n=e.toLowerCase(),r=[],i;for(let e=0;e<n.length;e++){let t=n[e];if(t===`a`&&n[e+1]===`m`&&(e++,i=`AM`),t===`p`&&n[e+1]===`m`&&(e++,i=`PM`),z(t)){let i=t;for(;z(n[e+1]);)e++,i+=n[e];r.push(Number.parseInt(i,10))}}if(r.length===0||r.length>3||i&&(r[0]<1||r[0]>12))throw Error(`Invalid time format`);(i||t)&&r[0]===12&&(r[0]=0),i===`PM`&&(r[0]+=12);let[a,o=0,s=0]=r;if(a>23||o>59||s>59)throw Error(`Invalid value`);return[a,o,s].map(p).join(`:`)},V={fromView:e=>e&&d(e)?e:``,toView(e){return e}},H=class extends L(u.t(s.n)){_toPresentationValue(e){return R(e,this._displaySeconds,this._use12hClock)}_parsePresentationValue(e){return B(e,this._use12hClock)}get _timeValue(){return this.value}_withUpdatedTime(e){return e}get _resolvedMinTime(){return this.min||null}get _resolvedMaxTime(){return this.max||null}minChanged(e,t){this.proxy instanceof HTMLInputElement&&(this.proxy.min=t,this.validate())}maxChanged(e,t){this.proxy instanceof HTMLInputElement&&(this.proxy.max=t,this.validate())}constructor(){super(),this._isValidValue=d,this.min=``,this.max=``,this.proxy.type=`time`,this.proxy.step=`1`}get _textFieldPlaceholder(){return this._timePlaceholder}get _pickerButtonIcon(){return`clock-line`}get _pickerButtonLabel(){return this.value?this.locale.timePicker.changeTimeLabel(this._toPresentationValue(this.value)):this.locale.timePicker.chooseTimeLabel}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(t.M.process(),this._focusableElsWithinDialog()[0]?.focus())}get _dialogLabel(){return this.locale.timePicker.chooseTimeLabel}_focusableElsWithinDialog(){return this._dialogEl.querySelectorAll(`#inline-time-picker, .vwc-button`)}_getCustomValidationError(){return this._isPresentationValueInvalid()?this.locale.timePicker.invalidTimeError:null}};a.t([t.m({converter:V})],H.prototype,`min`,void 0),a.t([t.m({converter:V})],H.prototype,`max`,void 0);var U=(e,n)=>{let i=e.tagFor(F);return t.p`
|
|
31
31
|
<${i}
|
|
32
32
|
id='inline-time-picker'
|
|
33
33
|
${r.t(`_inlineTimePickerEl`)}
|
|
@@ -231,7 +231,7 @@ i(K);
|
|
|
231
231
|
var q = (e) => {
|
|
232
232
|
class t extends e {
|
|
233
233
|
constructor(...e) {
|
|
234
|
-
super(...e), this.minutesStep = null, this.secondsStep = null, this
|
|
234
|
+
super(...e), this.minutesStep = null, this.secondsStep = null, this._clockChangeHandler = { handleChange: () => {
|
|
235
235
|
this.value && (this._presentationValue = this._toPresentationValue(this.value));
|
|
236
236
|
} };
|
|
237
237
|
}
|
|
@@ -245,19 +245,17 @@ var q = (e) => {
|
|
|
245
245
|
let e = "hh:mm";
|
|
246
246
|
return this._displaySeconds && (e += ":ss"), this._use12hClock && (e += " aa"), e;
|
|
247
247
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
#n() {
|
|
251
|
-
this.#t = s.binding(() => this._use12hClock, this.#e), this.#t.observe(this, r.default);
|
|
248
|
+
_startObservingClockChanges() {
|
|
249
|
+
this._clockChangeObserver = s.binding(() => this._use12hClock, this._clockChangeHandler), this._clockChangeObserver.observe(this, r.default);
|
|
252
250
|
}
|
|
253
|
-
|
|
254
|
-
this
|
|
251
|
+
_stopObservingClockChanges() {
|
|
252
|
+
this._clockChangeObserver.dispose();
|
|
255
253
|
}
|
|
256
254
|
connectedCallback() {
|
|
257
|
-
super.connectedCallback(), this
|
|
255
|
+
super.connectedCallback(), this._startObservingClockChanges();
|
|
258
256
|
}
|
|
259
257
|
disconnectedCallback() {
|
|
260
|
-
super.disconnectedCallback(), this
|
|
258
|
+
super.disconnectedCallback(), this._stopObservingClockChanges();
|
|
261
259
|
}
|
|
262
260
|
_onPickerButtonClick() {
|
|
263
261
|
super._onPickerButtonClick(), this._popupOpen && (n.process(), this._inlineTimePickerEl.scrollSelectedOptionsToTop());
|