@descope/web-components-ui 3.12.1 → 3.13.1
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.cjs.js +4121 -2426
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3165 -1468
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/6618.js +591 -0
- package/dist/umd/{7387.js.LICENSE.txt → 6618.js.LICENSE.txt} +6 -0
- package/dist/umd/6618.js.map +1 -0
- package/dist/umd/8350.js +2 -0
- package/dist/umd/8350.js.map +1 -0
- package/dist/umd/9265.js +2 -0
- package/dist/umd/9265.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +449 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +2 -2
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-month-day-field-picker.js +114 -0
- package/dist/umd/descope-month-day-field-picker.js.LICENSE.txt +11 -0
- package/dist/umd/descope-month-day-field-picker.js.map +1 -0
- package/dist/umd/descope-month-day-field.js +2 -0
- package/dist/umd/descope-month-day-field.js.map +1 -0
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-field.js +38 -0
- package/dist/umd/descope-text-field.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +39 -36
- package/src/components/descope-date-field/DateFieldClass.js +1 -1
- package/src/components/descope-date-field/index.js +1 -1
- package/src/components/descope-email-field/EmailFieldClass.js +1 -1
- package/src/components/descope-new-password/index.js +1 -1
- package/src/components/descope-number-field/NumberFieldClass.js +1 -1
- package/src/components/descope-passcode/PasscodeClass.js +1 -1
- package/src/components/descope-passcode/index.js +1 -1
- package/src/components/descope-radio-group/RadioGroupClass.js +1 -1
- package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +1 -1
- package/src/components/descope-security-questions-setup/index.js +1 -1
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +1 -1
- package/src/components/descope-security-questions-verify/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/components/mapping-fields/descope-saml-group-mappings/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/index.js +1 -1
- package/src/index.cjs.js +2 -2
- package/src/index.js +0 -1
- package/src/theme/components/index.js +5 -1
- package/stories/descope-text-field.stories.js +1 -1
- package/dist/umd/3685.js +0 -2
- package/dist/umd/3685.js.map +0 -1
- package/dist/umd/4518.js +0 -450
- package/dist/umd/4518.js.map +0 -1
- package/dist/umd/7387.js +0 -144
- package/dist/umd/7387.js.map +0 -1
- package/dist/umd/descope-text-field-index-js.js +0 -38
- package/dist/umd/descope-text-field-index-js.js.map +0 -1
- package/src/components/descope-text-field/TextFieldClass.js +0 -142
- package/src/components/descope-text-field/index.js +0 -9
- package/src/components/descope-text-field/textFieldMappings.js +0 -169
- package/src/theme/components/textField.js +0 -71
- /package/dist/umd/{4518.js.LICENSE.txt → descope-date-field-descope-calendar-index-js.js.LICENSE.txt} +0 -0
- /package/dist/umd/{descope-text-field-index-js.js.LICENSE.txt → descope-text-field.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,450 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6028],{19624(t,e,n){n.d(e,{J:()=>u,T:()=>l});var r=n(63200),a=n(25964),i=n(88961),o=n(98538),s=n(10767);const l=(0,a.xE)("button"),{host:d,label:h,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const u=(0,r.Zz)((0,i.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,i.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:o.S.cssVarList.fill},labelTextDecoration:{...h,property:"text-decoration"},labelSpacing:{...h,property:"gap"},textAlign:{...h,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),s.G,i.VO,i.tQ)((0,i.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:y,fontSize:g}=u.cssVarList;p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${y});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767(t,e,n){n.d(e,{G:()=>r});const r=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,n){n.r(e),n.d(e,{ButtonClass:()=>r.J,componentName:()=>r.T});var r=n(19624);n(83799),customElements.define(r.T,r.J)},98538(t,e,n){n.d(e,{S:()=>l,T:()=>s});var r=n(88961),a=n(25964),i=n(8512),o=n(63200);const s=(0,a.xE)("icon"),l=(0,o.Zz)((0,r.RF)({mappings:{fill:[{},{property:i.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)((0,r.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:s}))},8512(t,e,n){n.d(e,{T:()=>l,q:()=>c});var r=n(88961),a=n(72270),i=n(63200),o=n(25964),s=n(18782);const l=(0,o.xE)("image"),d=["src","src-dark"];class h extends((0,a.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,o.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,s.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&this.shouldRender(t)&&this.renderImage()}}const c=(0,i.Zz)((0,r.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)(h)},18782(t,e,n){n.d(e,{m:()=>i});var r=n(25414);const a=t=>{const e=r.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},i=async(t,e)=>{try{let n;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));n=a(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),r=await e.text();n=a(r)}else n=((t,e)=>{const n=document.createElement("img");return n.setAttribute("src",t),n.setAttribute("alt",e),n})(t,e);return n.style.setProperty("max-width","100%"),n.style.setProperty("max-height","100%"),n}catch{return null}}},3393(t,e,n){n.d(e,{y:()=>o});var r=n(9696),a=n(79365),i=n(81365);const o=(...t)=>(0,r.Zz)(a.XX,a._$,a.yF,a.jd)((0,i.q)(...t))},64101(t,e,n){n.d(e,{QF:()=>y,SP:()=>r,SZ:()=>g,Tv:()=>p,US:()=>l,V$:()=>o,eT:()=>s,lv:()=>u,mx:()=>d,nr:()=>c,rR:()=>h,ui:()=>a,wJ:()=>i});const r=["MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD"],a=r[0],i="YYYY-MM-DD",o=100,s="/",l=["January","February","March","April","May","June","July","August","September","October","November","December"],d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h={MONTH:{id:"month",min:1,max:12,placeholder:"MM"},DAY:{id:"day",min:1,max:31,placeholder:"DD"},YEAR:{id:"year",min:0,max:9999,placeholder:"YYYY"}},c={year:{min:1900,max:2099}},p="Done",u="Cancel",y="Today",g=150},15177(t,e,n){n.d(e,{N:()=>r});const r=(t,e)=>{if("number"==typeof t)return new Date(t);if("string"==typeof t){const n=new Date(t.replace(/-/g,"/"));return e?new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())):new Date(n)}return new Date}},88350(t,e,n){n.r(e),n.d(e,{CalendarClass:()=>z,componentName:()=>C}),n(27092),n(30576);var r=n(19624),a=n(25964),i=n(3393),o=n(9696),s=n(97810),l=n(73551),d=n(79365),h=n(49224),c=n(80071),p=n(64101),u=n(15177);const y=(t,e)=>Array.isArray(t)&&t.length===e&&t.filter(Boolean).length===e,g=({label:t,dataId:e,dataName:n})=>`\n\t<div class="combo-box-item"\n\t\tdata-id="${e}"\n\t\tdata-name="${n}"\n\t>\n\t\t\t${t}\n\t</div>\n`,b=(t=p.US)=>t.map((t,e)=>g({label:t,dataId:e+1,dataName:t})).join(""),v=(t,e)=>{const[n,r]=(0,h._G)(e),[a,i]=(0,h._G)(t);return a===n&&i===r},m=(t,e,n)=>(t.addEventListener("input",e),t.addEventListener("focusout",n),t),C=(0,s.xE)("calendar"),w=["initial-value","initial-year","initial-month","years-range","calendar-months","calendar-weekdays","calendar-label-today","st-host-direction","disabled","full-width"],f=["calendar-label-submit","calendar-label-cancel"],S=(0,i.y)({componentName:C,baseSelector:"div"}),{calendar:x,day:M,dayEntry:V,currentDay:D,selectedDay:N,disabledDay:H,weekday:E,topNav:T,topNavSelectors:Y,bottomNav:L,navPrev:A,navNext:k,navPrevRTL:B,navNextRTL:I,yearInput:$,monthInput:R}={calendar:{selector:()=>".calendar"},topNav:{selector:()=>".nav.top-nav"},topNavSelectors:{selector:()=>".nav.top-nav .selectors > span"},bottomNav:{selector:()=>".nav.bottom-nav"},day:{selector:()=>".day"},dayEntry:{selector:()=>".day-entry"},currentDay:{selector:()=>".day-entry[data-current-day] .day"},selectedDay:{selector:()=>".day-entry[data-selected] .day"},disabledDay:{selector:()=>'.day-entry[data-disabled="true"] .day'},weekday:{selector:()=>".weekday"},navPrev:{selector:()=>".nav-prev"},navNext:{selector:()=>".nav-next"},navPrevRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-prev'},navNextRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-next'},yearInput:{selector:()=>".year-input"},monthInput:{selector:()=>".month-input"}},z=(0,o.Zz)((0,d.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,d.RF)({mappings:{fontSize:{},fontFamily:{},hostWidth:[{selector:()=>":host",property:"width"},{selector:"table",property:"width"}],hostDirection:{property:"direction"},topNavVerticalPadding:[{...T,property:"padding-top"},{...T,property:"padding-bottom"}],topNavHorizointalPadding:[{...T,property:"padding-right"},{...T,property:"padding-left"}],topNavAlignment:{...T,property:"justify-content"},topNavGap:{...T,property:"gap"},topNavSelectorsGap:{...Y,property:"gap"},bottomNavVerticalPadding:[{...L,property:"padding-top"},{...L,property:"padding-bottom"}],bottomNavHorizontalPadding:[{...L,property:"padding-right"},{...L,property:"padding-left"}],bottomNavAlignment:{...L,property:"justify-content"},bottomNavGap:{...L,property:"gap"},navMarginBottom:{...T,property:"margin-bottom"},calendarPadding:[{...x,property:"padding-bottom"},{...x,property:"padding-right"},{...x,property:"padding-left"}],navBorderBottomWidth:{...T,property:"border-bottom-width"},navBorderBottomColor:{...T,property:"border-bottom-color"},navBorderBottomStyle:{...T,property:"border-bottom-style"},weekdayFontSize:{...E,property:"font-size"},weekdayFontWeight:{...E,property:"font-weight"},currentDayBorderColor:{...D,property:"border-color"},currentDayBorderWidth:{...D,property:"border-width"},currentDayBorderStyle:{...D,property:"border-style"},dayHeight:{...V,property:"height"},daySize:[{...M,property:"height"},{...M,property:"width"}],dayPadding:{...M,property:"padding"},dayRadius:{...M,property:"border-radius"},dayTextAlign:{...M,property:"text-align"},dayBlockAlign:{...M,property:"margin"},dayTextColor:{...M,property:"color"},dayFontWeight:{...M,property:"font-weight"},dayBackgroundColor:{...M,property:"background-color"},dayCursor:{...M,property:"cursor"},dayFontSize:{...M,property:"font-size"},dayBackgroundColorHover:{selector:()=>".day:hover",property:"background-color"},daySelectedTextdColor:{...N,property:"color"},daySelectedBackgroundColor:{...N,property:"background-color"},dayDisabledTextdColor:{...H,property:"color"},yearInputWidth:{...$,property:"width"},monthInputWidth:{...R,property:"width"},navButtonSize:[{...A,property:"width"},{...A,property:"height"},{...k,property:"width"},{...k,property:"height"}],navButtonCursor:[{...A,property:"cursor"},{...k,property:"cursor"}],navButtonRotation:[{...B,property:"transform"},{...I,property:"transform"}],navButtonOpacity:[{...A,property:"opacity"},{...k,property:"opacity"}]}}),d.VO,d.tQ)(class extends S{static get observedAttributes(){return[].concat(S.observedAttributes||[],w,f)}preview;epoch;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <nav class="nav top-nav">\n <div class="nav-prev">\n </div>\n <div class="selectors"></div>\n <div class="nav-next">\n </div>\n </nav>\n <div class="calendar"></div>\n <nav class="nav bottom-nav">\n <descope-button class="cancel-button" variant="link" mode="primary">Cancel</descope-button>\n <descope-button class="submit-button" variant="link" mode="primary" disabled="true">Done</descope-button>\n </nav>\n </div>\n ',(0,a.fz)(`\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled="true"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${r.J.cssVarList.horizontalPadding}: 0;\n ${r.J.cssVarList.verticalPadding}: 0;\n ${r.J.cssVarList.outlineWidth}: 0;\n }\n\n .combo-box-item {\n display:flex;\n flex-direction: column;\n }\n\n ${(0,l.Kl)()}\n `,this)}set value(t){if(!t)return;const e=(0,u.N)(t).getTime();(0,h.mZ)(e)&&e!==this.epoch&&(this.epoch=e,this.renderCalendar())}get value(){return this.epoch?(0,h.jO)(this.epoch,p.wJ):""}get isSelectedView(){return v(this.preview,this.epoch)}get isTodayView(){return v((0,h.Ln)(),this.preview)}get monthNames(){return(t=>{const e=t?.split(",");return y(e,12)?e:p.US})(this.getAttribute("calendar-months"))}get weekdayNames(){return(t=>{const e=t?.split?.(",");return y(e,7)?e:p.mx})(this.getAttribute("calendar-weekdays"))}get hasYearValue(){return!!this.yearInput.value}get hasMonthValue(){return!!this.monthInput.value}get yearsRange(){const t=this.getAttribute("years-range")?.split("-");if(2===t?.length){const[e,n]=t.map(Number);if(e<=n)return[e,n]}const e=(0,u.N)().getFullYear();return[e,e+p.V$]}init(){super.init?.(),this.initCalendar(),this.renderCalendar()}initCalendar(){this.calendar=this.shadowRoot.querySelector(".calendar"),this.navPrevEle=this.shadowRoot.querySelector(".nav-prev"),this.navNextEle=this.shadowRoot.querySelector(".nav-next"),this.submitButton=this.shadowRoot.querySelector(".submit-button"),this.cancelButton=this.shadowRoot.querySelector(".cancel-button"),this.initInputs(),this.initNav(),this.addEventListener("day-changed",()=>this.submitButton.removeAttribute("disabled")),this.submitButton.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}initInputs(){const t=(()=>{const t=document.createElement("span");return t.innerHTML=`\n <descope-combo-box\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="month-input"\n >\n ${b()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value="true"\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="year-input"\n no-empty-value="true"\n >\n </descope-combo-box>\n `,t})(this.monthNames,this.yearsRange);this.shadowRoot.querySelector(".selectors").appendChild(t),this.monthInput=m(this.shadowRoot.querySelector(".month-input"),this.onMonthChange.bind(this),this.onMonthInputBlur.bind(this)),this.yearInput=m(this.shadowRoot.querySelector(".year-input"),this.onYearChange.bind(this),this.onYearInputBlur.bind(this)),[this.monthInput,this.yearInput].forEach(t=>(0,s.EA)(this,t,{includeAttrs:["disabled","size","st-host-direction"]}))}initNav(){this.navPrevEle.addEventListener("click",this.navPrevMonth.bind(this)),this.navNextEle.addEventListener("click",this.navNextMonth.bind(this)),this.cancelButton.addEventListener("click",this.onCancel.bind(this)),this.submitButton.addEventListener("click",this.onSubmit.bind(this)),[this.navPrevEle,this.navNextEle].forEach(t=>(0,s.EA)(this,t,{includeAttrs:["size"]})),this.shadowRoot.querySelector(".nav-next").innerHTML=c.ZM,this.shadowRoot.querySelector(".nav-prev").innerHTML=c.i1}onSubmit(){this.isDisabled||this.value&&this.dispatchEvent(new CustomEvent("date-submit",{detail:(0,u.N)(this.preview)}))}onCancel(){this.isDisabled||(this.dispatchEvent(new CustomEvent("cancel")),this.dispatchEvent(new CustomEvent("date-cancel")),this.clearSelectedDay())}clearSelectedDay(){this.getSelectedDayEle()?.removeAttribute("data-selected"),this.submitButton.setAttribute("disabled","true"),this.epoch=""}updateInputs(){if(this.yearInput&&this.monthInput){const t=this.preview||(0,h.Ln)(),e=(0,h.Bl)(t),n=(0,h.tj)(t);this.monthInput.value=n,setTimeout(()=>{this.yearInput.baseElement.value=e})}}renderCalendar(){const t=(0,u.N)(this.preview||(0,h.Ln)()).getTime(),[e,n]=(0,h._G)(t);this.calendar&&(this.calendar.innerHTML=((t,e,n)=>{const r=((t,e)=>new Date(t,e,0).getDate())(t,e),a=new Date(t,e-1,1).getDay();let i="<table>";i+=`<thead><tr>${n.reduce((t,e)=>`${t}<th><span class="weekday">${e}</span></th>`,"")}</tr></thead>`,i+="<tbody>",i+="<tr>";for(let t=0;t<a;t++)i+="<td></td>";let o=a;for(let t=1;t<=r;t++)7===o&&(o=0,i+="</tr><tr>"),i+=`\n <td\n data-date-day="${t}"\n class="day-entry">\n <span class="day" data-date-day=${t}>\n ${t}\n </span>\n </td>\n `,o++;for(;o<7;)i+="<td></td>",o++;return i+="</tr></tbody></table>",i})(e,n,this.weekdayNames.map(t=>t.substring(0,3)))),Array.from(this.calendar?.querySelectorAll(".day-entry .day")||[]).forEach(t=>t.addEventListener("click",this.onDayChange.bind(this))),this.updateInputs(),this.setSelectedDay(),this.setCurrentDay()}onDayChange(t){if(this.isDisabled)return;const e=(0,u.N)(this.preview);e.setDate(Number(t.target.getAttribute("data-date-day"))),this.value=(0,h.jO)(e.getTime(),p.wJ),this.dispatchEvent(new CustomEvent("day-changed",{detail:e}))}onYearChange(t){if(!t.target.value)return;const e=(0,u.N)(this.preview);e.setFullYear(Number(t.target.value.trim())),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("year-changed",{detail:e}))}onMonthChange(t){if(!t.target.value)return;const e=(0,u.N)(this.preview);e.setMonth(Number(t.target.value)-1),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("month-changed",{detail:e}))}onYearInputBlur(t){this.yearInput.baseElement.value=t.target.value||(0,h.Bl)(this.preview)}onMonthInputBlur(t){this.monthInput.baseElement.value=t.target.value||(0,h.tj)(this.preview)}getSelectedDayEle(){const t=(0,u.N)(this.epoch).getDate();return this.calendar?.querySelector(`[data-date-day="${t}"]`)}getCurrentDayEle(){return this.calendar?.querySelector(`[data-date-day="${(0,h._B)()}"]`)}clearSelectedDays(){const t=this.calendar?.querySelectorAll("[data-selected]");t&&t.forEach(t=>t.removeAttribute("data-selected"))}setSelectedDay(){this.clearSelectedDays(),this.value&&this.isSelectedView&&this.getSelectedDayEle().setAttribute("data-selected","true")}setCurrentDay(){if(this.isTodayView){const t=this.getCurrentDayEle(),e=this.getAttribute("calendar-label-today")||p.QF;t?.setAttribute("data-current-day","true"),t?.setAttribute("title",e)}}navPrevMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,u.N)(t),n=e.getMonth();if(0===n){const t=e.getFullYear();e.setFullYear(t-1),e.setMonth(11)}else e.setMonth(n-1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}navNextMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,u.N)(t),n=e.getMonth();if(11===n){const t=e.getFullYear();e.setFullYear(t+1),e.setMonth(0)}else e.setMonth(n+1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}clearValue(){this.epoch="",this.value="",this.removeAttribute("preview"),this.submitButton.setAttribute("disabled","true")}onInitialValueChange(t){if(this.value)return;const e=(0,u.N)(t).getTime();(0,h.mZ)(e)?(this.epoch=e,this.preview=e):this.clearValue()}onYearsRangeChange(){setTimeout(()=>{this.yearInput&&(this.yearInput.innerHTML=(t=>{const[e,n]=t,r=[];for(let t=e;t<=n;t++)r.push(t);return r})(this.yearsRange).map(t=>g({label:t,dataId:t,dataName:t})).join(""))})}onMonthNamesChange(){setTimeout(()=>{this.monthInput&&(this.monthInput.innerHTML=b(this.monthNames))})}onSubmitLabelChange(t){this.submitButton&&(this.submitButton.textContent=t||p.Tv)}onCancelLabelChange(t){this.cancelButton&&(this.cancelButton.textContent=t||p.lv)}onInitialMonthChange(t){const e=(0,h.Bl)(this.preview);this.preview=(0,u.N)(`${e}/${t}/1`).getTime()}onInitialYearChange(t){const e=(0,h.tj)(this.preview);this.preview=(0,u.N)(`${t}/${e}/1`).getTime()}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),e!==n&&(f.includes(t)?("calendar-label-submit"===t&&this.onSubmitLabelChange(n),"calendar-label-cancel"===t&&this.onCancelLabelChange(n)):(n&&"initial-value"===t&&this.onInitialValueChange(n),n&&"initial-month"===t&&this.onInitialMonthChange(n),n&&"initial-year"===t&&this.onInitialYearChange(n),"years-range"===t&&this.onYearsRangeChange(Number(n)),"calendar-months"===t&&this.onMonthNamesChange(),"calendar-label-today"===t&&this.setCurrentDay(n),"disabled"===t&&setTimeout(()=>{this.cancelButton?.setAttribute("disabled","true"===n)}),this.renderCalendar()))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}});customElements.define(C,z)},77421(t,e,n){n.d(e,{F:()=>s});var r=n(64101),a=n(15177);const i={MM:"(0?[1-9]|1[0-2])",DD:"(0?[1-9]|[12][0-9]|3[01])",YYYY:"([0-9]{4})"},o=t=>{const e=(t=>`^${t.split(r.eT).map(t=>i[t]).join("\\D")}$`)(t),n=(t=>{const e=t.split(r.eT);return t=>{const n={};return e.forEach((e,r)=>{n[e]=t[r+1]}),[n.YYYY,n.MM,n.DD]}})(t),o=new RegExp(e);return{pattern:e,validate:t=>o.test(t),getDate:t=>((t,e,n)=>{const i=e.exec(t);if(!i)return null;const[o,s,l]=n(i);return(0,a.N)([o,s,l].join(r.eT))})(t,o,n)}},s=Object.fromEntries(r.SP.map(t=>[t,o(t)]))},49224(t,e,n){n.d(e,{Bl:()=>h,Et:()=>o,Ln:()=>d,Rm:()=>y,Xs:()=>u,_B:()=>p,_G:()=>s,jO:()=>l,mZ:()=>i,tj:()=>c,xq:()=>g});var r=n(77421),a=n(15177);const i=t=>!Number.isNaN(Number(t)),o=t=>!!String(t||"").trim()&&!Number.isNaN(Number(t)),s=t=>{const e=(0,a.N)(t);return[e.getFullYear(),e.getMonth()+1,e.getDate()]},l=(t,e)=>{const[n,r,a]=s(t),i={DD:String(a).padStart(2,"0"),MM:String(r).padStart(2,"0"),YYYY:String(n)};return e.replace(/DD|MM|YYYY/g,t=>i[t])},d=()=>(0,a.N)().getTime(),h=t=>(0,a.N)(t).getFullYear().toString(),c=t=>((0,a.N)(t).getMonth()+1).toString(),p=()=>(0,a.N)().getDate(),u=t=>{const e=new CSSStyleSheet;e.insertRule(":host{display:block!important;}"),t?.shadowRoot?.adoptedStyleSheets?.push(e)},y=(t,e)=>{const n=t.trim?.();return n?r.F[e].getDate(n):null},g=(t,e)=>"number"==typeof t?t:e?Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()):t.getTime()},80071(t,e,n){n.d(e,{ZM:()=>a,i1:()=>i,ki:()=>r});const r='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>\n</svg>\n',a='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z" fill="#808080"/>\n</svg>',i='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z" fill="#808080"/>\n</svg>'}}]);
|
|
1
|
+
/*! For license information please see descope-date-field-descope-calendar-index-js.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5691,6028],{89389(t,o,e){e.d(o,{$:()=>p});var r=e(13256),a=e(55774),i=e(82901),n=e(72562),s=e(81488),l=e(87550);const d=e(51450).AH`
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
position: relative;
|
|
6
|
+
outline: none;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
-moz-user-select: none;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([hidden]) {
|
|
14
|
+
display: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Aligns the button with form fields when placed on the same line.
|
|
18
|
+
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
|
19
|
+
.vaadin-button-container::before {
|
|
20
|
+
content: '\\2003';
|
|
21
|
+
display: inline-block;
|
|
22
|
+
width: 0;
|
|
23
|
+
max-height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vaadin-button-container {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
text-align: center;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
min-height: inherit;
|
|
34
|
+
text-shadow: inherit;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[part='prefix'],
|
|
38
|
+
[part='suffix'] {
|
|
39
|
+
flex: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[part='label'] {
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (forced-colors: active) {
|
|
49
|
+
:host {
|
|
50
|
+
outline: 1px solid;
|
|
51
|
+
outline-offset: -1px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([focused]) {
|
|
55
|
+
outline-width: 2px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([disabled]) {
|
|
59
|
+
outline-color: GrayText;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;var c=e(84467),u=e(53149),m=e(36176);const h=t=>class extends((0,c.e)((0,m.l)((0,u.y)(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};(0,l.SF)("vaadin-button",d,{moduleId:"vaadin-button-styles"});class p extends(h((0,n.q)((0,l.cp)((0,a.w)(r.Pu))))){static get is(){return"vaadin-button"}static get template(){return r.qy`
|
|
63
|
+
<div class="vaadin-button-container">
|
|
64
|
+
<span part="prefix" aria-hidden="true">
|
|
65
|
+
<slot name="prefix"></slot>
|
|
66
|
+
</span>
|
|
67
|
+
<span part="label">
|
|
68
|
+
<slot></slot>
|
|
69
|
+
</span>
|
|
70
|
+
<span part="suffix" aria-hidden="true">
|
|
71
|
+
<slot name="suffix"></slot>
|
|
72
|
+
</span>
|
|
73
|
+
</div>
|
|
74
|
+
<slot name="tooltip"></slot>
|
|
75
|
+
`}ready(){super.ready(),this._tooltipController=new s.I(this),this.addController(this._tooltipController)}}(0,i.X)(p)},93555(t,o,e){e.d(o,{x:()=>a}),e(64511),e(42068),e(9433),e(3241),e(83315);var r=e(87550);const a=r.AH`
|
|
76
|
+
:host {
|
|
77
|
+
/* Sizing */
|
|
78
|
+
--lumo-button-size: var(--lumo-size-m);
|
|
79
|
+
min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
|
|
80
|
+
height: var(--_button-size);
|
|
81
|
+
padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
|
|
82
|
+
margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
/* Style */
|
|
85
|
+
font-family: var(--lumo-font-family);
|
|
86
|
+
font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));
|
|
87
|
+
font-weight: var(--vaadin-button-font-weight, 500);
|
|
88
|
+
color: var(--_lumo-button-text-color);
|
|
89
|
+
background: var(--_lumo-button-background);
|
|
90
|
+
border: var(--vaadin-button-border, none);
|
|
91
|
+
border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));
|
|
92
|
+
cursor: var(--lumo-clickable-cursor);
|
|
93
|
+
-webkit-tap-highlight-color: transparent;
|
|
94
|
+
-webkit-font-smoothing: antialiased;
|
|
95
|
+
-moz-osx-font-smoothing: grayscale;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
--_button-size: var(--vaadin-button-height, var(--lumo-button-size));
|
|
98
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
99
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
100
|
+
/* Used by notification */
|
|
101
|
+
--_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));
|
|
102
|
+
--_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));
|
|
103
|
+
--_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));
|
|
104
|
+
--_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
|
108
|
+
[part='label'],
|
|
109
|
+
[part='prefix'],
|
|
110
|
+
[part='suffix'] {
|
|
111
|
+
line-height: var(--lumo-line-height-xs);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[part='label'] {
|
|
115
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host([theme~='small']) {
|
|
119
|
+
font-size: var(--lumo-font-size-s);
|
|
120
|
+
--lumo-button-size: var(--lumo-size-s);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host([theme~='large']) {
|
|
124
|
+
font-size: var(--lumo-font-size-l);
|
|
125
|
+
--lumo-button-size: var(--lumo-size-l);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* For interaction states */
|
|
129
|
+
:host::before,
|
|
130
|
+
:host::after {
|
|
131
|
+
content: '';
|
|
132
|
+
/* We rely on the host always being relative */
|
|
133
|
+
position: absolute;
|
|
134
|
+
z-index: 1;
|
|
135
|
+
inset: 0;
|
|
136
|
+
background-color: currentColor;
|
|
137
|
+
border-radius: inherit;
|
|
138
|
+
opacity: 0;
|
|
139
|
+
pointer-events: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Hover */
|
|
143
|
+
|
|
144
|
+
@media (any-hover: hover) {
|
|
145
|
+
:host(:hover)::before {
|
|
146
|
+
opacity: 0.02;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Active */
|
|
151
|
+
|
|
152
|
+
:host::after {
|
|
153
|
+
transition: opacity 1.4s, transform 0.1s;
|
|
154
|
+
filter: blur(8px);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host([active])::before {
|
|
158
|
+
opacity: 0.05;
|
|
159
|
+
transition-duration: 0s;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([active])::after {
|
|
163
|
+
opacity: 0.1;
|
|
164
|
+
transition-duration: 0s, 0s;
|
|
165
|
+
transform: scale(0);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Keyboard focus */
|
|
169
|
+
|
|
170
|
+
:host([focus-ring]) {
|
|
171
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host([theme~='primary'][focus-ring]) {
|
|
175
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Types (primary, tertiary, tertiary-inline */
|
|
179
|
+
|
|
180
|
+
:host([theme~='tertiary']),
|
|
181
|
+
:host([theme~='tertiary-inline']) {
|
|
182
|
+
--_background: transparent !important;
|
|
183
|
+
background: var(--vaadin-button-tertiary-background, var(--_background));
|
|
184
|
+
min-width: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host([theme~='tertiary']) {
|
|
188
|
+
border: var(--vaadin-button-tertiary-border, none);
|
|
189
|
+
color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));
|
|
190
|
+
font-weight: var(--vaadin-button-tertiary-font-weight, 500);
|
|
191
|
+
padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host([theme~='tertiary-inline'])::before {
|
|
195
|
+
display: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:host([theme~='tertiary-inline']) {
|
|
199
|
+
margin: 0;
|
|
200
|
+
height: auto;
|
|
201
|
+
padding: 0;
|
|
202
|
+
line-height: inherit;
|
|
203
|
+
font-size: inherit;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:host([theme~='tertiary-inline']) [part='label'] {
|
|
207
|
+
padding: 0;
|
|
208
|
+
overflow: visible;
|
|
209
|
+
line-height: inherit;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:host([theme~='primary']) {
|
|
213
|
+
background: var(--_lumo-button-primary-background);
|
|
214
|
+
border: var(--vaadin-button-primary-border, none);
|
|
215
|
+
color: var(--_lumo-button-primary-text-color);
|
|
216
|
+
font-weight: var(--vaadin-button-primary-font-weight, 600);
|
|
217
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host([theme~='primary'])::before {
|
|
221
|
+
background-color: black;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@media (any-hover: hover) {
|
|
225
|
+
:host([theme~='primary']:hover)::before {
|
|
226
|
+
opacity: 0.05;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:host([theme~='primary'][active])::before {
|
|
231
|
+
opacity: 0.1;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:host([theme~='primary'][active])::after {
|
|
235
|
+
opacity: 0.2;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Colors (success, error, contrast) */
|
|
239
|
+
|
|
240
|
+
:host([theme~='success']) {
|
|
241
|
+
color: var(--lumo-success-text-color);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
:host([theme~='success'][theme~='primary']) {
|
|
245
|
+
background-color: var(--lumo-success-color);
|
|
246
|
+
color: var(--lumo-success-contrast-color);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:host([theme~='error']) {
|
|
250
|
+
color: var(--lumo-error-text-color);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:host([theme~='error'][theme~='primary']) {
|
|
254
|
+
background-color: var(--lumo-error-color);
|
|
255
|
+
color: var(--lumo-error-contrast-color);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:host([theme~='contrast']) {
|
|
259
|
+
color: var(--lumo-contrast);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host([theme~='contrast'][theme~='primary']) {
|
|
263
|
+
background-color: var(--lumo-contrast);
|
|
264
|
+
color: var(--lumo-base-color);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Disabled state. Keep selectors after other color variants. */
|
|
268
|
+
|
|
269
|
+
:host([disabled]) {
|
|
270
|
+
pointer-events: none;
|
|
271
|
+
color: var(--lumo-disabled-text-color);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
:host([theme~='primary'][disabled]) {
|
|
275
|
+
background-color: var(--lumo-contrast-30pct);
|
|
276
|
+
color: var(--lumo-base-color);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:host([theme~='primary'][disabled]) [part] {
|
|
280
|
+
opacity: 0.7;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Icons */
|
|
284
|
+
|
|
285
|
+
[part] ::slotted(vaadin-icon) {
|
|
286
|
+
display: inline-block;
|
|
287
|
+
width: var(--lumo-icon-size-m);
|
|
288
|
+
height: var(--lumo-icon-size-m);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
292
|
+
[part] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
293
|
+
padding: 0.25em;
|
|
294
|
+
box-sizing: border-box !important;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
[part='prefix'] {
|
|
298
|
+
margin-left: -0.25em;
|
|
299
|
+
margin-right: 0.25em;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
[part='suffix'] {
|
|
303
|
+
margin-left: 0.25em;
|
|
304
|
+
margin-right: -0.25em;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* Icon-only */
|
|
308
|
+
|
|
309
|
+
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
310
|
+
min-width: var(--lumo-button-size);
|
|
311
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
|
312
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
:host([theme~='icon']) [part='prefix'],
|
|
316
|
+
:host([theme~='icon']) [part='suffix'] {
|
|
317
|
+
margin-left: 0;
|
|
318
|
+
margin-right: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* RTL specific styles */
|
|
322
|
+
|
|
323
|
+
:host([dir='rtl']) [part='prefix'] {
|
|
324
|
+
margin-left: 0.25em;
|
|
325
|
+
margin-right: -0.25em;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
:host([dir='rtl']) [part='suffix'] {
|
|
329
|
+
margin-left: -0.25em;
|
|
330
|
+
margin-right: 0.25em;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
|
334
|
+
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
|
335
|
+
margin-left: 0;
|
|
336
|
+
margin-right: 0;
|
|
337
|
+
}
|
|
338
|
+
`;(0,r.SF)("vaadin-button",a,{moduleId:"lumo-button"})},83799(t,o,e){e(93555),e(89389)},1632(t,o,e){e(52915),e(54886),e(27397),e(25244);var r=e(47642),a=e(87550);const i=a.AH`
|
|
339
|
+
:host {
|
|
340
|
+
outline: none;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
[part='toggle-button']::before {
|
|
344
|
+
content: var(--lumo-icons-dropdown);
|
|
345
|
+
}
|
|
346
|
+
`;(0,a.SF)("vaadin-combo-box",[r.k,i],{moduleId:"lumo-combo-box"}),e(86689);var n=e(13256),s=e(82901),l=e(23927),d=e(79769);class c extends((0,d.y)((0,a.cp)((0,l.v)(n.Pu)))){static get template(){return n.qy`
|
|
347
|
+
<style>
|
|
348
|
+
:host {
|
|
349
|
+
display: block;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
:host([hidden]) {
|
|
353
|
+
display: none;
|
|
354
|
+
}
|
|
355
|
+
</style>
|
|
356
|
+
<span part="checkmark" aria-hidden="true"></span>
|
|
357
|
+
<div part="content">
|
|
358
|
+
<slot></slot>
|
|
359
|
+
</div>
|
|
360
|
+
`}static get is(){return"vaadin-combo-box-item"}}(0,s.X)(c);var u=e(58069),m=e(5072),h=e(32888);const p=a.AH`
|
|
361
|
+
#overlay {
|
|
362
|
+
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
[part='content'] {
|
|
366
|
+
display: flex;
|
|
367
|
+
flex-direction: column;
|
|
368
|
+
height: 100%;
|
|
369
|
+
}
|
|
370
|
+
`;(0,a.SF)("vaadin-combo-box-overlay",[m.B,p],{moduleId:"vaadin-combo-box-overlay-styles"});class v extends((0,h.p)((0,u.c)((0,l.v)((0,a.cp)(n.Pu))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return n.qy`
|
|
371
|
+
<div id="backdrop" part="backdrop" hidden></div>
|
|
372
|
+
<div part="overlay" id="overlay">
|
|
373
|
+
<div part="loader"></div>
|
|
374
|
+
<div part="content" id="content"><slot></slot></div>
|
|
375
|
+
</div>
|
|
376
|
+
`}}(0,s.X)(v);var b=e(70616);class g extends((0,b.N)(n.Pu)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return n.qy`
|
|
377
|
+
<style>
|
|
378
|
+
:host {
|
|
379
|
+
display: block;
|
|
380
|
+
min-height: 1px;
|
|
381
|
+
overflow: auto;
|
|
382
|
+
|
|
383
|
+
/* Fixes item background from getting on top of scrollbars on Safari */
|
|
384
|
+
transform: translate3d(0, 0, 0);
|
|
385
|
+
|
|
386
|
+
/* Enable momentum scrolling on iOS */
|
|
387
|
+
-webkit-overflow-scrolling: touch;
|
|
388
|
+
|
|
389
|
+
/* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
|
|
390
|
+
box-shadow: 0 0 0 white;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
#selector {
|
|
394
|
+
border-width: var(--_vaadin-combo-box-items-container-border-width);
|
|
395
|
+
border-style: var(--_vaadin-combo-box-items-container-border-style);
|
|
396
|
+
border-color: var(--_vaadin-combo-box-items-container-border-color, transparent);
|
|
397
|
+
position: relative;
|
|
398
|
+
}
|
|
399
|
+
</style>
|
|
400
|
+
<div id="selector">
|
|
401
|
+
<slot></slot>
|
|
402
|
+
</div>
|
|
403
|
+
`}}(0,s.X)(g);var y=e(72562),f=e(81488),x=e(44218),w=e(18330),_=e(37720),k=e(83304);const z=t=>class extends((0,k.U)(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};var C=e(86314),S=e(11402),A=e(65909);(0,a.SF)("vaadin-combo-box",C.k,{moduleId:"vaadin-combo-box-styles"});class K extends((0,S.K)((0,A.x)(z((0,x.R)((0,a.cp)((0,y.q)(n.Pu))))))){static get is(){return"vaadin-combo-box"}static get template(){return n.qy`
|
|
404
|
+
<style>
|
|
405
|
+
:host([opened]) {
|
|
406
|
+
pointer-events: auto;
|
|
407
|
+
}
|
|
408
|
+
</style>
|
|
409
|
+
|
|
410
|
+
<div class="vaadin-combo-box-container">
|
|
411
|
+
<div part="label">
|
|
412
|
+
<slot name="label"></slot>
|
|
413
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
414
|
+
</div>
|
|
415
|
+
|
|
416
|
+
<vaadin-input-container
|
|
417
|
+
part="input-field"
|
|
418
|
+
readonly="[[readonly]]"
|
|
419
|
+
disabled="[[disabled]]"
|
|
420
|
+
invalid="[[invalid]]"
|
|
421
|
+
theme$="[[_theme]]"
|
|
422
|
+
>
|
|
423
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
424
|
+
<slot name="input"></slot>
|
|
425
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
426
|
+
<div id="toggleButton" part="toggle-button" slot="suffix" aria-hidden="true"></div>
|
|
427
|
+
</vaadin-input-container>
|
|
428
|
+
|
|
429
|
+
<div part="helper-text">
|
|
430
|
+
<slot name="helper"></slot>
|
|
431
|
+
</div>
|
|
432
|
+
|
|
433
|
+
<div part="error-message">
|
|
434
|
+
<slot name="error-message"></slot>
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
|
|
438
|
+
<vaadin-combo-box-overlay
|
|
439
|
+
id="overlay"
|
|
440
|
+
opened="[[_overlayOpened]]"
|
|
441
|
+
loading$="[[loading]]"
|
|
442
|
+
theme$="[[_theme]]"
|
|
443
|
+
position-target="[[_positionTarget]]"
|
|
444
|
+
no-vertical-overlap
|
|
445
|
+
restore-focus-node="[[inputElement]]"
|
|
446
|
+
></vaadin-combo-box-overlay>
|
|
447
|
+
|
|
448
|
+
<slot name="tooltip"></slot>
|
|
449
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new w.f(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new _.q(this.inputElement,this._labelController)),this._tooltipController=new f.I(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(t=>!t.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const o=t.composedPath();(o.includes(this._labelNode)||o.includes(this._positionTarget))&&super._onHostClick(t)}}(0,s.X)(K)}}]);
|
|
2
450
|
//# sourceMappingURL=descope-date-field-descope-calendar-index-js.js.map
|