@maggioli-design-system/magma 1.12.1 → 1.12.3
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/mds-button_3.cjs.entry.js +59 -36
- package/dist/cjs/mds-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date.cjs.entry.js +1 -1
- package/dist/collection/components/mds-calendar/mds-calendar.css +4 -2
- package/dist/collection/components/mds-icon/services/icons-set.service.js +38 -16
- package/dist/collection/components/mds-input-date/mds-input-date.css +3 -2
- package/dist/collection/components/mds-input-date/test/mds-input-date.stories.js +75 -0
- package/dist/components/mds-calendar2.js +1 -1
- package/dist/components/mds-icon2.js +59 -36
- package/dist/components/mds-input-date.js +1 -1
- package/dist/documentation.json +1 -1
- package/dist/esm/mds-button_3.entry.js +59 -36
- package/dist/esm/mds-calendar_2.entry.js +1 -1
- package/dist/esm/mds-input-date.entry.js +1 -1
- package/dist/esm-es5/mds-button_3.entry.js +1 -1
- package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
- package/dist/esm-es5/mds-input-date.entry.js +1 -1
- package/dist/hydrate/index.js +61 -38
- package/dist/hydrate/index.mjs +61 -38
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-20e0f9e3.entry.js → p-19522afa.entry.js} +1 -1
- package/dist/magma-components/p-25c84410.system.entry.js +1 -0
- package/dist/magma-components/p-26cd6ec8.system.js +1 -1
- package/dist/magma-components/{p-c6785782.entry.js → p-3183791a.entry.js} +1 -1
- package/dist/magma-components/p-44889d04.system.entry.js +1 -0
- package/dist/magma-components/p-5214b07e.entry.js +1 -0
- package/dist/magma-components/{p-68dde65c.system.entry.js → p-8465aa1a.system.entry.js} +1 -1
- package/dist/stats.json +40 -40
- package/dist/types/components/mds-icon/services/icons-set.service.d.ts +9 -9
- package/dist/types/components/mds-input-date/test/mds-input-date.stories.d.ts +4 -0
- package/package.json +2 -2
- package/dist/magma-components/p-3e72a9f4.entry.js +0 -1
- package/dist/magma-components/p-a776c78c.system.entry.js +0 -1
- package/dist/magma-components/p-ca4ee5b5.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,r,t,a){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function l(e){try{s(a.next(e))}catch(e){i(e)}}function o(e){try{s(a["throw"](e))}catch(e){i(e)}}function s(e){e.done?t(e.value):n(e.value).then(l,o)}s((a=a.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,l;return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(r){return s([e,r])}}function s(o){if(a)throw new TypeError("Generator is already executing.");while(l&&(l=0,o[0]&&(t=0)),t)try{if(a=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;n=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1];i=o;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(o);break}if(i[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];n=0}finally{a=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7f153b9b.js";import{D as DateTime_1}from"./luxon-f19ca6e2.js";import{L as Locale}from"./locale-2adad180.js";import{s as sanitizeISO8601Date}from"./date-b1d0c9c5.js";import{c as clsx}from"./clsx-297c1ffe.js";import"./_commonjsHelpers-bdec4bbd.js";var miBaselineForwardIos='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M6.23 20.23L8 22l10-10L8 2L6.23 3.77L14.46 12z"/></svg>';var miBaselineBackIosNew='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.77 3.77L16 2L6 12l10 10l1.77-1.77L9.54 12z"/></svg>';var mdsCalendarCss=":host{--mds-calendar-day-number-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-day-number-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-gap:0.125rem;--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:0.5rem;--mds-calendar-background:rgb(var(--tone-neutral));--mds-calendar-padding:1rem;--mds-calendar-select-month-or-year-height:2.25rem;--mds-calendar-select-month-or-year-width:14rem;background-color:rgb(var(--tone-neutral-09));border-radius:var(--mds-calendar-border-radius);cursor:auto;display:-ms-inline-flexbox;display:inline-flex;max-width:380px;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background);border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;-ms-flex:1 1 auto;flex:1 1 auto;padding:var(--mds-calendar-padding)}.calendar-preselection{display:none;gap:0.125rem;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;padding:var(--mds-calendar-padding)}.calendar-preselection--has-preselection{display:grid}nav{display:-ms-flexbox;display:flex;gap:0.5rem;-ms-flex-pack:justify;justify-content:space-between;min-width:0}.action{padding-left:0.5rem;padding-right:0.5rem;-ms-flex-pack:left;justify-content:left;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content}.action-back,.action-forward{-ms-flex-negative:0;flex-shrink:0}.select-month-or-year{-ms-flex-align:stretch;align-items:stretch;background-color:rgb(var(--tone-neutral-09));block-size:var(--mds-calendar-select-month-or-year-height);border-radius:var(--mds-calendar-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--mds-calendar-select-month-or-year-width);flex:0 0 var(--mds-calendar-select-month-or-year-width);height:var(--mds-calendar-select-month-or-year-height);-ms-flex-pack:start;justify-content:flex-start;inline-size:var(--mds-calendar-select-month-or-year-width);max-block-size:var(--mds-calendar-select-month-or-year-height);max-height:var(--mds-calendar-select-month-or-year-height);max-inline-size:var(--mds-calendar-select-month-or-year-width);min-block-size:var(--mds-calendar-select-month-or-year-height);min-height:var(--mds-calendar-select-month-or-year-height);min-inline-size:var(--mds-calendar-select-month-or-year-width);overflow:hidden}.action-month,.action-year{--mds-button-radius:0;-ms-flex-item-align:stretch;align-self:stretch;block-size:100%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:default;height:100%;max-block-size:100%;max-height:100%;min-block-size:0;min-height:0;padding-left:0.5rem;padding-right:0.5rem}.action-month{-ms-flex:1 1 auto;flex:1 1 auto;min-width:0}.action-year{-ms-flex:0 0 4.5rem;flex:0 0 4.5rem}.action-month::part(label),.action-year::part(label){overflow:visible;text-overflow:clip;white-space:nowrap}.week-day-name{-ms-flex-align:center;align-items:center;aspect-ratio:1;min-height:auto;padding:0}.month-view{display:grid}.month-view__days-names,.month-view__cells{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(7, minmax(1px, 100%));min-width:0}.month-view{display:grid}.month-view__month-names,.month-view__years{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(3, minmax(1px, 100%));min-width:0}";var MdsCalendarStyle0=mdsCalendarCss;var MdsCalendar=function(){function e(e){var r=this;registerInstance(this,e);this.datesEmitter=createEvent(this,"mdsCalendarChange",7);this.navigationEmitter=createEvent(this,"mdsCalendarNavigate",7);this.hoverEmitter=createEvent(this,"mdsCalendarHover",7);this.checkPreselectionsEmitter=createEvent(this,"mdsCalendarPreselect",7);this.hasPreselection=false;this.currentDate=DateTime_1.now();this.weekDaysinMonth=[];this.weekdays=[];this.startDateIdentifier=null;this.endDateIdentifier=null;this.isFirstClick=true;this.currentView="calendar";this.selectedYear=this.currentDate.year;this.t=new Locale({it:{},en:{},es:{},el:{}});this.rangePicker=true;this.showPreviousButton=true;this.showNextButton=true;this.disableMonthYearSelection=false;this.showPreselection=false;this.viewDate=null;this.hoverDate=null;this.startDate=null;this.endDate=null;this.min=null;this.max=null;this.internalStartDate=this.startDate;this.internalEndDate=this.endDate;this.currentMonth="";this.currentYear="";this.handleMouseOver=function(e){var t=e.target;if(!t.matches("mds-calendar-cell")||!r.rangePicker||!r.internalStartDate||r.internalEndDate){return}var a=t.getAttribute("date");if(a){r.hoverEmitter.emit({hoverDate:a})}};this.handleMouseLeave=function(){if(!r.rangePicker||!r.internalStartDate||r.internalEndDate||!r.hoverDate){return}r.hoverEmitter.emit({hoverDate:null})};this.handleMonthActionClick=function(e){e.stopPropagation();if(r.disableMonthYearSelection){e.preventDefault();return}r.currentView=r.currentView==="months"?"calendar":"months";requestAnimationFrame((function(){r.updateCalendar().then((function(){return r.setDates()}))}))};this.handleYearActionClick=function(e){e.stopPropagation();if(r.disableMonthYearSelection){e.preventDefault();return}r.currentView=r.currentView==="years"?"calendar":"years";requestAnimationFrame((function(){r.updateCalendar().then((function(){return r.setDates()}))}))}}e.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=this.t.lang(this.host);return[2]}))}))};e.prototype.handleStartDate=function(e){if(e!==null&&e!==""){this.internalStartDate=sanitizeISO8601Date(e===null||e===void 0?void 0:e.toString());this.startDateTime=DateTime_1.fromISO(this.internalStartDate);this.startDateIdentifier=this.startDateTime.toISODate();if(this.internalEndDate){var r=DateTime_1.fromISO(this.internalEndDate);if(this.startDateTime>r){console.warn("startDate is after endDate, swapping values");return}}else if(this.rangePicker){this.isFirstClick=false}this.updateDates()}else if(e===null||e===""){this.internalStartDate=null;this.startDateIdentifier=null;this.startDateTime=null;this.isFirstClick=true;this.updateDates()}};e.prototype.handleEndDate=function(e){if(!this.rangePicker){console.warn("rangePicker is disabled, endDate cannot be set");this.internalEndDate=null}else if(e!==null&&e!==""){this.internalEndDate=sanitizeISO8601Date(e===null||e===void 0?void 0:e.toString());this.endDateTime=DateTime_1.fromISO(this.internalEndDate);this.endDateIdentifier=this.endDateTime.toISODate();if(this.internalStartDate){var r=DateTime_1.fromISO(this.internalStartDate);if(r>this.endDateTime){console.warn("startDate is after endDate, swapping values");return}}this.updateDates()}else if(e===null||e===""){this.internalEndDate=null;this.endDateIdentifier=null;this.endDateTime=null;this.updateDates()}};e.prototype.handleViewDate=function(e){var r=this;if(e!==null&&e!==""){var t=DateTime_1.fromISO(e.toString());if(t.isValid){this.currentDate=t;this.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}))}}};e.prototype.handleHoverDate=function(){var e=this;requestAnimationFrame((function(){return e.setDates()}))};e.prototype.componentWillLoad=function(){var e,r;this.language=this.t.lang(this.host);if(this.viewDate){var t=DateTime_1.fromISO(this.viewDate.toString());if(t.isValid){this.currentDate=t}}else if(this.internalStartDate){this.internalStartDate=sanitizeISO8601Date((e=this.internalStartDate)===null||e===void 0?void 0:e.toString());this.startDateTime=DateTime_1.fromISO(this.internalStartDate);if(this.startDateTime.isValid){this.currentDate=this.startDateTime}}if(this.internalEndDate){this.internalEndDate=sanitizeISO8601Date((r=this.internalEndDate)===null||r===void 0?void 0:r.toString());this.endDateTime=DateTime_1.fromISO(this.internalEndDate)}this.updateCalendar()};e.prototype.componentDidLoad=function(){var e,r,t,a,n;this.hasPreselection=((e=this.host)===null||e===void 0?void 0:e.querySelector(".date-preselection--has-preselection"))!==null;(t=(r=this.host)===null||r===void 0?void 0:r.shadowRoot)===null||t===void 0?void 0:t.addEventListener("mouseover",this.handleMouseOver);(n=(a=this.host)===null||a===void 0?void 0:a.shadowRoot)===null||n===void 0?void 0:n.addEventListener("mouseleave",this.handleMouseLeave);this.setDates()};e.prototype.disconnectedCallback=function(){var e,r,t,a;(r=(e=this.host)===null||e===void 0?void 0:e.shadowRoot)===null||r===void 0?void 0:r.removeEventListener("mouseover",this.handleMouseOver);(a=(t=this.host)===null||t===void 0?void 0:t.shadowRoot)===null||a===void 0?void 0:a.removeEventListener("mouseleave",this.handleMouseLeave)};e.prototype.updateCurrentDate=function(e){return __awaiter(this,void 0,void 0,(function(){var r=this;return __generator(this,(function(t){switch(t.label){case 0:this.currentDate=DateTime_1.fromISO(e);return[4,this.updateCalendar()];case 1:t.sent();return[4,new Promise((function(e){requestAnimationFrame((function(){r.setDates();e()}))}))];case 2:t.sent();return[2,Promise.resolve()]}}))}))};e.prototype.updateDates=function(){var e=this;this.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))};e.prototype.updateCalendar=function(){return __awaiter(this,void 0,void 0,(function(){var e;var r=this;return __generator(this,(function(t){try{e=this.currentDate.startOf("week");this.weekdays=Array.from({length:7}).map((function(t,a){return e.setLocale(r.language).plus({days:a}).toFormat("ccc")}));this.calculateWeekDaysInMonth();this.currentMonth=this.currentDate.setLocale(this.language).toFormat("MMMM");this.currentMonthNumber=this.currentDate.month;this.currentYear=this.currentDate.toFormat("yyyy")}catch(e){console.error("Error while updating the calendar:",e)}return[2]}))}))};e.prototype.setDates=function(){var e=this.host;if(!e)return;var r=e.shadowRoot;if(!r)return;var t=r.querySelectorAll("mds-calendar-cell[selection], mds-calendar-cell[preview]");if(this.rangePicker){if(this.hoverDate&&!this.internalEndDate){this.setHoverSelection(t,r)}else{this.setRangeSelection(t,r)}}else{this.setSingleSelection(t,r)}};e.prototype.clearSelectionState=function(e){e.forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))};e.prototype.setRangeSelection=function(e,r){var t=this;this.clearSelectionState(e);if(!this.internalStartDate)return;this.startDateTime=DateTime_1.fromISO(this.internalStartDate.toString());if(!this.internalEndDate){this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false;var a=r.querySelectorAll("mds-calendar-cell");a.forEach((function(e){if(e.getAttribute("date")===t.startDateTime.toFormat("yyyy-MM-dd")){e.setAttribute("selection","single");e.setAttribute("preview","true")}}));return}this.endDateTime=DateTime_1.fromISO(this.internalEndDate.toString());this.startDateIdentifier=this.startDateTime.toISODate();this.endDateIdentifier=this.endDateTime.toISODate();var n=r.querySelectorAll("mds-calendar-cell");if(n){var i=void 0;for(var l=0;l<n.length;l++){var o=n[l].getAttribute("date");if(o){var s=DateTime_1.fromISO(o);if(s.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){n[l].setAttribute("selection","start")}if(s.toFormat("yyyy-MM-dd")===this.endDateTime.toFormat("yyyy-MM-dd")){if(this.startDateTime.equals(this.endDateTime)){n[l].setAttribute("selection","single")}else{n[l].setAttribute("selection","end")}}i=s>this.startDateTime&&s<this.endDateTime;if(i){n[l].setAttribute("selection","middle")}}}}};e.prototype.setHoverSelection=function(e,r){this.clearSelectionState(e);if(!this.internalStartDate||!this.hoverDate){this.setRangeSelection(e,r);return}var t=DateTime_1.fromISO(this.internalStartDate);var a=DateTime_1.fromISO(this.hoverDate);if(!t.isValid||!a.isValid){this.setRangeSelection(e,r);return}var n=t<=a;var i=Array.from(r.querySelectorAll("mds-calendar-cell"));i.forEach((function(e){var r=e.getAttribute("date");if(!r)return;var i=DateTime_1.fromISO(r);if(!i.isValid)return;var l=n?i>=t&&i<=a:i>=a&&i<=t;if(!l)return;e.setAttribute("preview","true");var o="middle";if(t.equals(a)&&i.equals(t)){o="single"}else if(i.equals(t)){o=n?"start":"end"}else if(i.equals(a)){o=n?"end":"start"}e.setAttribute("selection",o)}))};e.prototype.setSingleSelection=function(e,r){this.clearSelectionState(e);if(!this.internalStartDate)return;this.startDateTime=DateTime_1.fromISO(this.internalStartDate.toString());var t=r.querySelectorAll("mds-calendar-cell");if(t){for(var a=0;a<t.length;a++){var n=t[a].getAttribute("date");if(n){var i=DateTime_1.fromISO(n);if(i.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){t[a].setAttribute("selection","single")}}}}};e.prototype.changeMonth=function(e){var r=this;this.currentDate=this.currentDate.plus({months:e});this.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}));this.navigationEmitter.emit({currentDate:this.currentDate.toISODate(),delta:e})};e.prototype.calculateWeekDaysInMonth=function(){var e=this.currentDate.startOf("month");var r=this.currentDate.endOf("month");var t=[];var a=e.weekday;var n=a-1;var i=e.minus({days:n});for(var l=i;l<e;l=l.plus({days:1})){t.push({date:l,isCurrentMonth:false})}for(var l=e;l<=r;l=l.plus({days:1})){t.push({date:l,isCurrentMonth:true})}var o=r.weekday;var s=7-o;var c=r.plus({days:1});for(var l=c;l<c.plus({days:s});l=l.plus({days:1})){t.push({date:l,isCurrentMonth:false})}this.weekDaysinMonth=t};e.prototype.handleRange=function(e,r){var t=this;var a,n;var i=this.startDate||this.host.getAttribute("start-date");if(this.rangePicker&&i&&!this.endDate&&!this.internalEndDate&&this.isFirstClick){this.internalStartDate=sanitizeISO8601Date(i.toString());this.startDateTime=DateTime_1.fromISO(this.internalStartDate);this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false}var l=function(){t.internalStartDate=null;t.internalEndDate=null;t.startDateIdentifier=null;t.startDateTime=null;t.endDateIdentifier=null;t.endDateTime=null;t.isFirstClick=true;var e=t.host;requestAnimationFrame((function(){var r;(r=e===null||e===void 0?void 0:e.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))}))};if(this.startDateIdentifier&&this.endDateIdentifier){l()}if(this.isFirstClick){this.startDateIdentifier=r.toISODate();this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;var o=this.host;requestAnimationFrame((function(){var e;(e=o===null||o===void 0?void 0:o.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}))}));requestAnimationFrame((function(){e.setAttribute("selection","single");e.setAttribute("preview","true")}));this.datesEmitter.emit({startDate:this.internalStartDate});return}var s=this.host;var c=(a=s===null||s===void 0?void 0:s.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar-cell");var d=Array.from(c!==null&&c!==void 0?c:[]).findIndex((function(e){return e.getAttribute("date")===t.startDateIdentifier}));var h=Array.from(c!==null&&c!==void 0?c:[]).indexOf(e);if(this.startDateIdentifier&&DateTime_1.fromISO(this.startDateIdentifier)<DateTime_1.fromISO(e.getAttribute("date"))){this.endDateIdentifier=e.getAttribute("date");this.endDateTime=r;this.internalEndDate=this.endDateTime.toISO().split("T")[0]}else{this.endDateIdentifier=this.startDateIdentifier;this.endDateTime=this.startDateTime;this.internalEndDate=this.internalStartDate;this.startDateIdentifier=e.getAttribute("date");this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0]}(n=s===null||s===void 0?void 0:s.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("mds-calendar-cell[preview]").forEach((function(e){e.removeAttribute("preview")}));if(c&&d!==-1){for(var u=d+1;u<h;u++){c[u].setAttribute("selection","middle")}}if(this.internalStartDate&&this.internalEndDate){this.datesEmitter.emit({startDate:this.internalStartDate,endDate:this.internalEndDate});this.checkPreselectionsEmitter.emit()}};e.prototype.handleSingleSelection=function(e,r){var t;var a=this.host;(t=a===null||a===void 0?void 0:a.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}));this.startDateIdentifier=e.getAttribute("date");this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;e.setAttribute("selection","single");if(this.internalStartDate){this.datesEmitter.emit({startDate:this.internalStartDate})}};e.prototype.render=function(){var e=this;return h(Host,{key:"271209054e3f86d3c167ab6f2d84c801619f7fdb"},h("div",{key:"084902141f92f15f4b62ec34fc826b939f0ff05b",class:clsx("calendar-preselection",(this.showPreselection||this.hasPreselection)&&"calendar-preselection--has-preselection")},h("slot",{key:"986c1168978cc658b3a7409adafac5651cae7c77",name:"preselection"})),h("div",{key:"bbb9882d52d1fd89758704604c3a52016535561e",class:"calendar-view"},h("nav",{key:"9f993a0c44e484303716cef6530d9d95e84226a1"},this.showPreviousButton&&h("mds-button",{key:"f78027217275a9f0896fdfaa2ed99fd10064f581",class:"action-back",icon:miBaselineBackIosNew,variant:"dark",tone:"quiet",onClick:function(r){if(e.currentView==="calendar"){r.stopPropagation();e.changeMonth(-1)}else if(e.currentView==="years"){r.stopPropagation();e.selectedYear-=10}else{r.stopPropagation()}}}),h("div",{key:"e2916642b7072db24f8e800fb033260a9c2a3dcd",class:"select-month-or-year"},(this.currentView==="calendar"||this.currentView==="months")&&h("mds-button",{key:"112c7d69205f2c57587a4ba12ecd7b445ef66170",class:"action-month",truncate:"none",variant:"dark",tone:"quiet",onClick:this.handleMonthActionClick},this.currentMonth),(this.currentView==="calendar"||this.currentView==="years")&&h("mds-button",{key:"91f990cfdafb34e3983f7e375e695dce5fde11fd",class:"action-year",truncate:"none",variant:"dark",tone:"quiet",onClick:this.handleYearActionClick},this.currentYear)),this.showNextButton&&h("mds-button",{key:"d297451100785c186b8ae054fa0203007f218cb7",class:"action-forward",icon:miBaselineForwardIos,variant:"dark",tone:"quiet",onClick:function(r){if(e.currentView==="calendar"){r.stopPropagation();e.changeMonth(1)}else if(e.currentView==="years"){r.stopPropagation();e.selectedYear+=10}else{r.stopPropagation()}}})),this.currentView==="calendar"&&h("section",{key:"bf8eba9f66065c91d0f4feac4ddbc93c1fc63ad4",class:"month-view"},h("header",{key:"c90bf7ed93129ab8bfc3ecaab99fb2d012adab39",class:"month-view__days-names"},this.weekdays.map((function(e){return h("mds-button",{class:"week-day-name",variant:"dark",tone:"quiet"},e)}))),h("div",{key:"6b5fb95ad179b38fefe0986b48a3a12a287ccf61",class:"month-view__cells"},this.weekDaysinMonth.map((function(r,t){return h("mds-calendar-cell",{key:t,today:DateTime_1.now().toFormat("yyyy-MM-dd")===r.date.toFormat("yyyy-MM-dd"),date:r.date.toFormat("yyyy-MM-dd"),month:r.isCurrentMonth?"current":"other",disabled:function(){if(e.min&&e.min!==""&&r.date<DateTime_1.fromISO(e.min)){return true}if(e.max&&e.max!==""&&r.date>DateTime_1.fromISO(e.max)){return true}return undefined}(),onClick:function(t){t.stopPropagation();var a=t.currentTarget;if(e.rangePicker)e.handleRange(a,r.date);else e.handleSingleSelection(a,r.date)},title:r.date.setLocale(e.language).toFormat("cccc d LLLL").replace(/^./,(function(e){return e.toUpperCase()}))},r.date.toFormat("dd"))})))),this.currentView==="months"&&h("section",{key:"5353ed4497b33fb5260cf6c2d1f087b228a0cda3",class:"month-selection"},h("header",{key:"70247928e4a74589900b0acd3b8d02686e41a4d1",class:"month-view__month-names"},Array.from({length:12}).map((function(r,t){var a=DateTime_1.local().set({month:t+1}).setLocale(e.language).toFormat("MMMM");return h("mds-button",{class:"action",variant:"dark",tone:"quiet",onClick:function(r){r.stopPropagation();e.currentDate=e.currentDate.set({month:t+1});e.currentMonth=e.currentDate.toFormat("MMMM");e.currentView="calendar";e.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))}},a)})))),this.currentView==="years"&&h("section",{key:"99dca1c5f3ce083cb3bb117ce8bb705faa83e19c",class:"year-selection"},h("header",{key:"7d479a8c05815560306486bf0825a521c971a6e4",class:"month-view__years"},Array.from({length:12}).map((function(r,t){var a=e.selectedYear+t;return h("mds-button",{class:"action",variant:"dark",tone:"quiet",onClick:function(r){r.stopPropagation();e.currentDate=e.currentDate.set({year:a});e.currentYear=a.toString();e.currentView="calendar";e.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))}},a)}))))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{startDate:["handleStartDate"],endDate:["handleEndDate"],viewDate:["handleViewDate"],hoverDate:["handleHoverDate"]}},enumerable:false,configurable:true});return e}();MdsCalendar.style=MdsCalendarStyle0;var mdsCalendarCellCss=':host{--mds-calendar-cell-background:transparent;--mds-calendar-cell-boundaries-background:transparent;--mds-calendar-cell-boundaries-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-boundaries-padding:0.25rem;--mds-calendar-cell-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-other-month-background:transparent;--mds-calendar-cell-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-cell-disabled-background:transparent;--mds-calendar-cell-disabled-color:rgb(var(--tone-neutral-07));--mds-calendar-cell-weekend-background:transparent;--mds-calendar-cell-weekend-color:rgb(var(--tone-neutral-06));--mds-calendar-cell-size:3rem;--mds-calendar-cell-selection-boundaries-border-radius:calc(var(--mds-calendar-cell-size) / 2);--mds-calendar-cell-selection-week-boundaries-border-radius:calc(var(--mds-calendar-cell-size) / 2);--mds-calendar-cell-preselection-today-background:rgb(var(--variant-primary-09));--mds-calendar-cell-preselection-today-color:rgb(var(--variant-primary-03));--mds-calendar-cell-preselection-current-month-background:rgb(var(--variant-primary-08));--mds-calendar-cell-preselection-current-month-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-current-month-boundaries-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-current-month-boundaries-background:rgb(var(--variant-primary-10));--mds-calendar-cell-preselection-other-month-background:rgb(var(--variant-primary-09));--mds-calendar-cell-preselection-other-month-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-other-month-boundaries-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-other-month-boundaries-background:rgb(var(--tone-neutral));--mds-calendar-cell-selection-current-month-background:rgb(var(--variant-primary-04));--mds-calendar-cell-selection-current-month-color:rgb(var(--tone-neutral));--mds-calendar-cell-selection-current-month-boundaries-background:rgb(var(--tone-neutral));--mds-calendar-cell-selection-current-month-boundaries-color:rgb(var(--tone-neutral-03));--mds-calendar-cell-selection-current-month-weekend-background:rgb(var(--variant-primary-03));--mds-calendar-cell-selection-current-month-weekend-color:rgb(var(--variant-primary-07));--mds-calendar-cell-selection-current-month-weekend-boundaries-background:rgb(var(--variant-primary-03));--mds-calendar-cell-selection-current-month-weekend-boundaries-color:rgb(var(--tone-neutral-03));--mds-calendar-cell-selection-other-month-background:rgb(var(--variant-primary-07));--mds-calendar-cell-selection-other-month-color:rgb(var(--tone-neutral-04));--mds-calendar-cell-selection-other-month-boundaries-background:rgb(var(--variant-primary-10));--mds-calendar-cell-selection-other-month-boundaries-color:rgb(var(--tone-neutral-05));aspect-ratio:1 / 1;display:-ms-flexbox;display:flex;padding:var(--mds-calendar-cell-boundaries-padding);position:relative}:host([month="other"]){visibility:var(--mds-calendar-cell-other-month-visibility, hidden)}.inner-dot{aspect-ratio:1 / 1;background-color:var(--mds-calendar-cell-inner-background);border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);display:-ms-flexbox;display:flex;min-height:0;min-width:0;width:100%;z-index:1}.area-background{background-color:var(--mds-calendar-cell-background);color:var(--mds-calendar-cell-color);inset:0;position:absolute;z-index:0}.action{-ms-flex-align:center;align-items:center;aspect-ratio:1 / 1;background-color:transparent;border-radius:0;color:var(--mds-calendar-cell-color);display:-ms-flexbox;display:flex;inset:calc(var(--mds-calendar-cell-gap) * -1);-ms-flex-pack:center;justify-content:center;min-height:0;min-width:0;padding:0;position:absolute;width:auto;z-index:2}:host([selection][orientation="horizontal"]) .area-background{margin-left:calc(var(--mds-calendar-cell-gap) * -1);margin-right:calc(var(--mds-calendar-cell-gap) * -1)}:host([selection="start"][orientation="horizontal"]) .area-background{border-bottom-left-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);border-top-left-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);margin-left:0}:host([selection="end"][orientation="horizontal"]) .area-background{border-bottom-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);margin-right:0}:host([selection][orientation="vertical"]) .area-background{margin-bottom:calc(var(--mds-calendar-cell-gap) * -1);margin-top:calc(var(--mds-calendar-cell-gap) * -1)}:host([selection="start"][orientation="vertical"]) .area-background{border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius) var(--mds-calendar-cell-selection-boundaries-border-radius) 0 0;margin-top:0}:host([selection="end"][orientation="vertical"]) .area-background{border-radius:0 0 var(--mds-calendar-cell-selection-boundaries-border-radius) var(--mds-calendar-cell-selection-boundaries-border-radius);margin-bottom:0}:host([orientation="vertical"]:not([selection="start"],[selection="end"])) .area-background{border-radius:0}:host(:nth-child(7n - 6)) .area-background,:host([selection="end"][orientation="horizontal"]:nth-child(7n - 6)) .area-background{border-bottom-left-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius);border-top-left-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius)}:host(:nth-child(7n)) .area-background,:host([selection="end"][orientation="horizontal"]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius);border-top-right-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius)}:host([selection="end"][orientation="horizontal"]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius)}:host([selection][orientation="horizontal"]:nth-child(7n - 6)) .area-background{margin-left:0}:host([selection][orientation="horizontal"]:nth-child(7n)) .area-background{margin-right:0}:host([selection="single"][orientation="horizontal"]) .area-background{border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);margin-left:0;margin-right:0}:host(:nth-child(7n - 1)),:host(:nth-child(7n)){--mds-calendar-cell-color:var(--mds-calendar-cell-weekend-color);--mds-calendar-cell-background:var(--mds-calendar-cell-weekend-background)}:host([month="other"]:not([selection])){--mds-calendar-cell-color:var(--mds-calendar-cell-other-month-color);--mds-calendar-cell-background:var(--mds-calendar-cell-other-month-background)}:host([disabled]){--mds-calendar-cell-color:var(--mds-calendar-cell-disabled-color);--mds-calendar-cell-background:var(--mds-calendar-cell-disabled-background);cursor:auto;pointer-events:none}:host(:not([selection])[today]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-today-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-today-color)}:host([selection][month="current"]){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-current-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-color)}:host([selection][month="current"]:nth-child(7n - 1)),:host([selection][month="current"]:nth-child(7n)){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-current-month-weekend-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-weekend-color)}:host([selection="start"][month="current"]:nth-child(7n - 1)),:host([selection="end"][month="current"]:nth-child(7n - 1)),:host([selection="start"][month="current"]:nth-child(7n)),:host([selection="end"][month="current"]:nth-child(7n)){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-color)}:host([selection][month="other"]){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-other-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-other-month-color)}:host([selection="start"][month="current"]),:host([selection="end"][month="current"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-selection-current-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-boundaries-color)}:host([selection="start"][month="other"]),:host([selection="end"][month="other"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-selection-other-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-other-month-boundaries-color)}:host([selection][month="current"][preview]:not([preview="false"])){--mds-calendar-cell-background:var(--mds-calendar-cell-preselection-current-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-current-month-color)}:host([selection][month="other"][preview]:not([preview="false"])){--mds-calendar-cell-background:var(--mds-calendar-cell-preselection-other-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-other-month-color)}:host([selection="start"][month="current"][preview]:not([preview="false"])),:host([selection="end"][month="current"][preview]:not([preview="false"])){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-current-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-current-month-boundaries-color)}:host([selection="start"][month="other"][preview]:not([preview="false"])),:host([selection="end"][month="other"][preview]:not([preview="false"])){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-other-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-other-month-boundaries-color)}:host([selection="single"][month="current"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-current-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-current-month-boundaries-color)}:host([selection="single"][month="other"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-other-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-other-month-boundaries-color)}';var MdsCalendarCellStyle0=mdsCalendarCellCss;var MdsCalendarCell=function(){function e(e){registerInstance(this,e);this.month="current";this.orientation="horizontal";this.preview=false;this.disabled=undefined;this.today=undefined}e.prototype.render=function(){return h(Host,{key:"09389f01297dc7e38499fc5783fbe7b5be73cee5"},h("div",{key:"6501ca7b41eed8696e60156abf53f0cbbecae8d5",class:"inner-dot"}),h("div",{key:"34f8e50ba0032d7d9d3dd63aafc5ac536f1a0adf",class:"area-background"}),h("mds-button",{key:"bedafcb2817bfeac6ebee9fa3e0887a41a1bce9b",class:"action",variant:"dark",tone:"quiet",disabled:this.disabled},h("slot",{key:"197f10e47b61a6c6140774cd3e2443df61d9e4a4"})))};return e}();MdsCalendarCell.style=MdsCalendarCellStyle0;export{MdsCalendar as mds_calendar,MdsCalendarCell as mds_calendar_cell};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,r,t,a){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function l(e){try{s(a.next(e))}catch(e){i(e)}}function o(e){try{s(a["throw"](e))}catch(e){i(e)}}function s(e){e.done?t(e.value):n(e.value).then(l,o)}s((a=a.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,l;return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(r){return s([e,r])}}function s(o){if(a)throw new TypeError("Generator is already executing.");while(l&&(l=0,o[0]&&(t=0)),t)try{if(a=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;n=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1];i=o;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(o);break}if(i[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];n=0}finally{a=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7f153b9b.js";import{D as DateTime_1}from"./luxon-f19ca6e2.js";import{L as Locale}from"./locale-2adad180.js";import{s as sanitizeISO8601Date}from"./date-b1d0c9c5.js";import{c as clsx}from"./clsx-297c1ffe.js";import"./_commonjsHelpers-bdec4bbd.js";var miBaselineForwardIos='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M6.23 20.23L8 22l10-10L8 2L6.23 3.77L14.46 12z"/></svg>';var miBaselineBackIosNew='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.77 3.77L16 2L6 12l10 10l1.77-1.77L9.54 12z"/></svg>';var mdsCalendarCss=":host{--mds-calendar-day-number-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-day-number-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-gap:0.125rem;--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:0.5rem;--mds-calendar-background:rgb(var(--tone-neutral));--mds-calendar-padding:1rem;--mds-calendar-select-month-or-year-height:2.25rem;--mds-calendar-select-month-or-year-width:14rem;background-color:rgb(var(--tone-neutral-09));border-radius:var(--mds-calendar-border-radius);cursor:auto;display:-ms-inline-flexbox;display:inline-flex;inline-size:100%;max-width:380px;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background);border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;-ms-flex:1 1 auto;flex:1 1 auto;padding:var(--mds-calendar-padding)}.calendar-preselection{display:none;gap:0.125rem;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;padding:var(--mds-calendar-padding)}.calendar-preselection--has-preselection{display:grid}nav{display:-ms-flexbox;display:flex;gap:0.5rem;-ms-flex-pack:justify;justify-content:space-between;min-width:0}.action{padding-left:0.5rem;padding-right:0.5rem;-ms-flex-pack:left;justify-content:left;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content}.action-back,.action-forward{-ms-flex-negative:0;flex-shrink:0}.select-month-or-year{-ms-flex-align:stretch;align-items:stretch;background-color:rgb(var(--tone-neutral-09));block-size:var(--mds-calendar-select-month-or-year-height);border-radius:var(--mds-calendar-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--mds-calendar-select-month-or-year-width);flex:0 0 var(--mds-calendar-select-month-or-year-width);height:var(--mds-calendar-select-month-or-year-height);inline-size:var(--mds-calendar-select-month-or-year-width);-ms-flex-pack:start;justify-content:flex-start;max-block-size:var(--mds-calendar-select-month-or-year-height);max-height:var(--mds-calendar-select-month-or-year-height);max-inline-size:var(--mds-calendar-select-month-or-year-width);min-block-size:var(--mds-calendar-select-month-or-year-height);min-height:var(--mds-calendar-select-month-or-year-height);min-inline-size:var(--mds-calendar-select-month-or-year-width);overflow:hidden}.action-month,.action-year{--mds-button-radius:0;-ms-flex-item-align:stretch;align-self:stretch;block-size:100%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:default;height:100%;max-block-size:100%;max-height:100%;min-block-size:0;min-height:0;padding-left:0.5rem;padding-right:0.5rem}.action-month{-ms-flex:1 1 auto;flex:1 1 auto;min-width:0}.action-year{-ms-flex:0 0 4.5rem;flex:0 0 4.5rem}.action-month::part(label),.action-year::part(label){overflow:visible;text-overflow:clip;white-space:nowrap}.week-day-name{-ms-flex-align:center;align-items:center;block-size:3rem;inline-size:100%;min-height:auto;padding:0}.month-view{display:grid}.month-view__days-names,.month-view__cells{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(7, minmax(1px, 100%));min-width:0}.month-view{display:grid}.month-view__month-names,.month-view__years{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(3, minmax(1px, 100%));min-width:0}";var MdsCalendarStyle0=mdsCalendarCss;var MdsCalendar=function(){function e(e){var r=this;registerInstance(this,e);this.datesEmitter=createEvent(this,"mdsCalendarChange",7);this.navigationEmitter=createEvent(this,"mdsCalendarNavigate",7);this.hoverEmitter=createEvent(this,"mdsCalendarHover",7);this.checkPreselectionsEmitter=createEvent(this,"mdsCalendarPreselect",7);this.hasPreselection=false;this.currentDate=DateTime_1.now();this.weekDaysinMonth=[];this.weekdays=[];this.startDateIdentifier=null;this.endDateIdentifier=null;this.isFirstClick=true;this.currentView="calendar";this.selectedYear=this.currentDate.year;this.t=new Locale({it:{},en:{},es:{},el:{}});this.rangePicker=true;this.showPreviousButton=true;this.showNextButton=true;this.disableMonthYearSelection=false;this.showPreselection=false;this.viewDate=null;this.hoverDate=null;this.startDate=null;this.endDate=null;this.min=null;this.max=null;this.internalStartDate=this.startDate;this.internalEndDate=this.endDate;this.currentMonth="";this.currentYear="";this.handleMouseOver=function(e){var t=e.target;if(!t.matches("mds-calendar-cell")||!r.rangePicker||!r.internalStartDate||r.internalEndDate){return}var a=t.getAttribute("date");if(a){r.hoverEmitter.emit({hoverDate:a})}};this.handleMouseLeave=function(){if(!r.rangePicker||!r.internalStartDate||r.internalEndDate||!r.hoverDate){return}r.hoverEmitter.emit({hoverDate:null})};this.handleMonthActionClick=function(e){e.stopPropagation();if(r.disableMonthYearSelection){e.preventDefault();return}r.currentView=r.currentView==="months"?"calendar":"months";requestAnimationFrame((function(){r.updateCalendar().then((function(){return r.setDates()}))}))};this.handleYearActionClick=function(e){e.stopPropagation();if(r.disableMonthYearSelection){e.preventDefault();return}r.currentView=r.currentView==="years"?"calendar":"years";requestAnimationFrame((function(){r.updateCalendar().then((function(){return r.setDates()}))}))}}e.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=this.t.lang(this.host);return[2]}))}))};e.prototype.handleStartDate=function(e){if(e!==null&&e!==""){this.internalStartDate=sanitizeISO8601Date(e===null||e===void 0?void 0:e.toString());this.startDateTime=DateTime_1.fromISO(this.internalStartDate);this.startDateIdentifier=this.startDateTime.toISODate();if(this.internalEndDate){var r=DateTime_1.fromISO(this.internalEndDate);if(this.startDateTime>r){console.warn("startDate is after endDate, swapping values");return}}else if(this.rangePicker){this.isFirstClick=false}this.updateDates()}else if(e===null||e===""){this.internalStartDate=null;this.startDateIdentifier=null;this.startDateTime=null;this.isFirstClick=true;this.updateDates()}};e.prototype.handleEndDate=function(e){if(!this.rangePicker){console.warn("rangePicker is disabled, endDate cannot be set");this.internalEndDate=null}else if(e!==null&&e!==""){this.internalEndDate=sanitizeISO8601Date(e===null||e===void 0?void 0:e.toString());this.endDateTime=DateTime_1.fromISO(this.internalEndDate);this.endDateIdentifier=this.endDateTime.toISODate();if(this.internalStartDate){var r=DateTime_1.fromISO(this.internalStartDate);if(r>this.endDateTime){console.warn("startDate is after endDate, swapping values");return}}this.updateDates()}else if(e===null||e===""){this.internalEndDate=null;this.endDateIdentifier=null;this.endDateTime=null;this.updateDates()}};e.prototype.handleViewDate=function(e){var r=this;if(e!==null&&e!==""){var t=DateTime_1.fromISO(e.toString());if(t.isValid){this.currentDate=t;this.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}))}}};e.prototype.handleHoverDate=function(){var e=this;requestAnimationFrame((function(){return e.setDates()}))};e.prototype.componentWillLoad=function(){var e,r;this.language=this.t.lang(this.host);if(this.viewDate){var t=DateTime_1.fromISO(this.viewDate.toString());if(t.isValid){this.currentDate=t}}else if(this.internalStartDate){this.internalStartDate=sanitizeISO8601Date((e=this.internalStartDate)===null||e===void 0?void 0:e.toString());this.startDateTime=DateTime_1.fromISO(this.internalStartDate);if(this.startDateTime.isValid){this.currentDate=this.startDateTime}}if(this.internalEndDate){this.internalEndDate=sanitizeISO8601Date((r=this.internalEndDate)===null||r===void 0?void 0:r.toString());this.endDateTime=DateTime_1.fromISO(this.internalEndDate)}this.updateCalendar()};e.prototype.componentDidLoad=function(){var e,r,t,a,n;this.hasPreselection=((e=this.host)===null||e===void 0?void 0:e.querySelector(".date-preselection--has-preselection"))!==null;(t=(r=this.host)===null||r===void 0?void 0:r.shadowRoot)===null||t===void 0?void 0:t.addEventListener("mouseover",this.handleMouseOver);(n=(a=this.host)===null||a===void 0?void 0:a.shadowRoot)===null||n===void 0?void 0:n.addEventListener("mouseleave",this.handleMouseLeave);this.setDates()};e.prototype.disconnectedCallback=function(){var e,r,t,a;(r=(e=this.host)===null||e===void 0?void 0:e.shadowRoot)===null||r===void 0?void 0:r.removeEventListener("mouseover",this.handleMouseOver);(a=(t=this.host)===null||t===void 0?void 0:t.shadowRoot)===null||a===void 0?void 0:a.removeEventListener("mouseleave",this.handleMouseLeave)};e.prototype.updateCurrentDate=function(e){return __awaiter(this,void 0,void 0,(function(){var r=this;return __generator(this,(function(t){switch(t.label){case 0:this.currentDate=DateTime_1.fromISO(e);return[4,this.updateCalendar()];case 1:t.sent();return[4,new Promise((function(e){requestAnimationFrame((function(){r.setDates();e()}))}))];case 2:t.sent();return[2,Promise.resolve()]}}))}))};e.prototype.updateDates=function(){var e=this;this.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))};e.prototype.updateCalendar=function(){return __awaiter(this,void 0,void 0,(function(){var e;var r=this;return __generator(this,(function(t){try{e=this.currentDate.startOf("week");this.weekdays=Array.from({length:7}).map((function(t,a){return e.setLocale(r.language).plus({days:a}).toFormat("ccc")}));this.calculateWeekDaysInMonth();this.currentMonth=this.currentDate.setLocale(this.language).toFormat("MMMM");this.currentMonthNumber=this.currentDate.month;this.currentYear=this.currentDate.toFormat("yyyy")}catch(e){console.error("Error while updating the calendar:",e)}return[2]}))}))};e.prototype.setDates=function(){var e=this.host;if(!e)return;var r=e.shadowRoot;if(!r)return;var t=r.querySelectorAll("mds-calendar-cell[selection], mds-calendar-cell[preview]");if(this.rangePicker){if(this.hoverDate&&!this.internalEndDate){this.setHoverSelection(t,r)}else{this.setRangeSelection(t,r)}}else{this.setSingleSelection(t,r)}};e.prototype.clearSelectionState=function(e){e.forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))};e.prototype.setRangeSelection=function(e,r){var t=this;this.clearSelectionState(e);if(!this.internalStartDate)return;this.startDateTime=DateTime_1.fromISO(this.internalStartDate.toString());if(!this.internalEndDate){this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false;var a=r.querySelectorAll("mds-calendar-cell");a.forEach((function(e){if(e.getAttribute("date")===t.startDateTime.toFormat("yyyy-MM-dd")){e.setAttribute("selection","single");e.setAttribute("preview","true")}}));return}this.endDateTime=DateTime_1.fromISO(this.internalEndDate.toString());this.startDateIdentifier=this.startDateTime.toISODate();this.endDateIdentifier=this.endDateTime.toISODate();var n=r.querySelectorAll("mds-calendar-cell");if(n){var i=void 0;for(var l=0;l<n.length;l++){var o=n[l].getAttribute("date");if(o){var s=DateTime_1.fromISO(o);if(s.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){n[l].setAttribute("selection","start")}if(s.toFormat("yyyy-MM-dd")===this.endDateTime.toFormat("yyyy-MM-dd")){if(this.startDateTime.equals(this.endDateTime)){n[l].setAttribute("selection","single")}else{n[l].setAttribute("selection","end")}}i=s>this.startDateTime&&s<this.endDateTime;if(i){n[l].setAttribute("selection","middle")}}}}};e.prototype.setHoverSelection=function(e,r){this.clearSelectionState(e);if(!this.internalStartDate||!this.hoverDate){this.setRangeSelection(e,r);return}var t=DateTime_1.fromISO(this.internalStartDate);var a=DateTime_1.fromISO(this.hoverDate);if(!t.isValid||!a.isValid){this.setRangeSelection(e,r);return}var n=t<=a;var i=Array.from(r.querySelectorAll("mds-calendar-cell"));i.forEach((function(e){var r=e.getAttribute("date");if(!r)return;var i=DateTime_1.fromISO(r);if(!i.isValid)return;var l=n?i>=t&&i<=a:i>=a&&i<=t;if(!l)return;e.setAttribute("preview","true");var o="middle";if(t.equals(a)&&i.equals(t)){o="single"}else if(i.equals(t)){o=n?"start":"end"}else if(i.equals(a)){o=n?"end":"start"}e.setAttribute("selection",o)}))};e.prototype.setSingleSelection=function(e,r){this.clearSelectionState(e);if(!this.internalStartDate)return;this.startDateTime=DateTime_1.fromISO(this.internalStartDate.toString());var t=r.querySelectorAll("mds-calendar-cell");if(t){for(var a=0;a<t.length;a++){var n=t[a].getAttribute("date");if(n){var i=DateTime_1.fromISO(n);if(i.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){t[a].setAttribute("selection","single")}}}}};e.prototype.changeMonth=function(e){var r=this;this.currentDate=this.currentDate.plus({months:e});this.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}));this.navigationEmitter.emit({currentDate:this.currentDate.toISODate(),delta:e})};e.prototype.calculateWeekDaysInMonth=function(){var e=this.currentDate.startOf("month");var r=this.currentDate.endOf("month");var t=[];var a=e.weekday;var n=a-1;var i=e.minus({days:n});for(var l=i;l<e;l=l.plus({days:1})){t.push({date:l,isCurrentMonth:false})}for(var l=e;l<=r;l=l.plus({days:1})){t.push({date:l,isCurrentMonth:true})}var o=r.weekday;var s=7-o;var c=r.plus({days:1});for(var l=c;l<c.plus({days:s});l=l.plus({days:1})){t.push({date:l,isCurrentMonth:false})}this.weekDaysinMonth=t};e.prototype.handleRange=function(e,r){var t=this;var a,n;var i=this.startDate||this.host.getAttribute("start-date");if(this.rangePicker&&i&&!this.endDate&&!this.internalEndDate&&this.isFirstClick){this.internalStartDate=sanitizeISO8601Date(i.toString());this.startDateTime=DateTime_1.fromISO(this.internalStartDate);this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false}var l=function(){t.internalStartDate=null;t.internalEndDate=null;t.startDateIdentifier=null;t.startDateTime=null;t.endDateIdentifier=null;t.endDateTime=null;t.isFirstClick=true;var e=t.host;requestAnimationFrame((function(){var r;(r=e===null||e===void 0?void 0:e.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))}))};if(this.startDateIdentifier&&this.endDateIdentifier){l()}if(this.isFirstClick){this.startDateIdentifier=r.toISODate();this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;var o=this.host;requestAnimationFrame((function(){var e;(e=o===null||o===void 0?void 0:o.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}))}));requestAnimationFrame((function(){e.setAttribute("selection","single");e.setAttribute("preview","true")}));this.datesEmitter.emit({startDate:this.internalStartDate});return}var s=this.host;var c=(a=s===null||s===void 0?void 0:s.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar-cell");var d=Array.from(c!==null&&c!==void 0?c:[]).findIndex((function(e){return e.getAttribute("date")===t.startDateIdentifier}));var h=Array.from(c!==null&&c!==void 0?c:[]).indexOf(e);if(this.startDateIdentifier&&DateTime_1.fromISO(this.startDateIdentifier)<DateTime_1.fromISO(e.getAttribute("date"))){this.endDateIdentifier=e.getAttribute("date");this.endDateTime=r;this.internalEndDate=this.endDateTime.toISO().split("T")[0]}else{this.endDateIdentifier=this.startDateIdentifier;this.endDateTime=this.startDateTime;this.internalEndDate=this.internalStartDate;this.startDateIdentifier=e.getAttribute("date");this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0]}(n=s===null||s===void 0?void 0:s.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("mds-calendar-cell[preview]").forEach((function(e){e.removeAttribute("preview")}));if(c&&d!==-1){for(var u=d+1;u<h;u++){c[u].setAttribute("selection","middle")}}if(this.internalStartDate&&this.internalEndDate){this.datesEmitter.emit({startDate:this.internalStartDate,endDate:this.internalEndDate});this.checkPreselectionsEmitter.emit()}};e.prototype.handleSingleSelection=function(e,r){var t;var a=this.host;(t=a===null||a===void 0?void 0:a.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}));this.startDateIdentifier=e.getAttribute("date");this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;e.setAttribute("selection","single");if(this.internalStartDate){this.datesEmitter.emit({startDate:this.internalStartDate})}};e.prototype.render=function(){var e=this;return h(Host,{key:"271209054e3f86d3c167ab6f2d84c801619f7fdb"},h("div",{key:"084902141f92f15f4b62ec34fc826b939f0ff05b",class:clsx("calendar-preselection",(this.showPreselection||this.hasPreselection)&&"calendar-preselection--has-preselection")},h("slot",{key:"986c1168978cc658b3a7409adafac5651cae7c77",name:"preselection"})),h("div",{key:"bbb9882d52d1fd89758704604c3a52016535561e",class:"calendar-view"},h("nav",{key:"9f993a0c44e484303716cef6530d9d95e84226a1"},this.showPreviousButton&&h("mds-button",{key:"f78027217275a9f0896fdfaa2ed99fd10064f581",class:"action-back",icon:miBaselineBackIosNew,variant:"dark",tone:"quiet",onClick:function(r){if(e.currentView==="calendar"){r.stopPropagation();e.changeMonth(-1)}else if(e.currentView==="years"){r.stopPropagation();e.selectedYear-=10}else{r.stopPropagation()}}}),h("div",{key:"e2916642b7072db24f8e800fb033260a9c2a3dcd",class:"select-month-or-year"},(this.currentView==="calendar"||this.currentView==="months")&&h("mds-button",{key:"112c7d69205f2c57587a4ba12ecd7b445ef66170",class:"action-month",truncate:"none",variant:"dark",tone:"quiet",onClick:this.handleMonthActionClick},this.currentMonth),(this.currentView==="calendar"||this.currentView==="years")&&h("mds-button",{key:"91f990cfdafb34e3983f7e375e695dce5fde11fd",class:"action-year",truncate:"none",variant:"dark",tone:"quiet",onClick:this.handleYearActionClick},this.currentYear)),this.showNextButton&&h("mds-button",{key:"d297451100785c186b8ae054fa0203007f218cb7",class:"action-forward",icon:miBaselineForwardIos,variant:"dark",tone:"quiet",onClick:function(r){if(e.currentView==="calendar"){r.stopPropagation();e.changeMonth(1)}else if(e.currentView==="years"){r.stopPropagation();e.selectedYear+=10}else{r.stopPropagation()}}})),this.currentView==="calendar"&&h("section",{key:"bf8eba9f66065c91d0f4feac4ddbc93c1fc63ad4",class:"month-view"},h("header",{key:"c90bf7ed93129ab8bfc3ecaab99fb2d012adab39",class:"month-view__days-names"},this.weekdays.map((function(e){return h("mds-button",{class:"week-day-name",variant:"dark",tone:"quiet"},e)}))),h("div",{key:"6b5fb95ad179b38fefe0986b48a3a12a287ccf61",class:"month-view__cells"},this.weekDaysinMonth.map((function(r,t){return h("mds-calendar-cell",{key:t,today:DateTime_1.now().toFormat("yyyy-MM-dd")===r.date.toFormat("yyyy-MM-dd"),date:r.date.toFormat("yyyy-MM-dd"),month:r.isCurrentMonth?"current":"other",disabled:function(){if(e.min&&e.min!==""&&r.date<DateTime_1.fromISO(e.min)){return true}if(e.max&&e.max!==""&&r.date>DateTime_1.fromISO(e.max)){return true}return undefined}(),onClick:function(t){t.stopPropagation();var a=t.currentTarget;if(e.rangePicker)e.handleRange(a,r.date);else e.handleSingleSelection(a,r.date)},title:r.date.setLocale(e.language).toFormat("cccc d LLLL").replace(/^./,(function(e){return e.toUpperCase()}))},r.date.toFormat("dd"))})))),this.currentView==="months"&&h("section",{key:"5353ed4497b33fb5260cf6c2d1f087b228a0cda3",class:"month-selection"},h("header",{key:"70247928e4a74589900b0acd3b8d02686e41a4d1",class:"month-view__month-names"},Array.from({length:12}).map((function(r,t){var a=DateTime_1.local().set({month:t+1}).setLocale(e.language).toFormat("MMMM");return h("mds-button",{class:"action",variant:"dark",tone:"quiet",onClick:function(r){r.stopPropagation();e.currentDate=e.currentDate.set({month:t+1});e.currentMonth=e.currentDate.toFormat("MMMM");e.currentView="calendar";e.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))}},a)})))),this.currentView==="years"&&h("section",{key:"99dca1c5f3ce083cb3bb117ce8bb705faa83e19c",class:"year-selection"},h("header",{key:"7d479a8c05815560306486bf0825a521c971a6e4",class:"month-view__years"},Array.from({length:12}).map((function(r,t){var a=e.selectedYear+t;return h("mds-button",{class:"action",variant:"dark",tone:"quiet",onClick:function(r){r.stopPropagation();e.currentDate=e.currentDate.set({year:a});e.currentYear=a.toString();e.currentView="calendar";e.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))}},a)}))))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{startDate:["handleStartDate"],endDate:["handleEndDate"],viewDate:["handleViewDate"],hoverDate:["handleHoverDate"]}},enumerable:false,configurable:true});return e}();MdsCalendar.style=MdsCalendarStyle0;var mdsCalendarCellCss=':host{--mds-calendar-cell-background:transparent;--mds-calendar-cell-boundaries-background:transparent;--mds-calendar-cell-boundaries-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-boundaries-padding:0.25rem;--mds-calendar-cell-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-other-month-background:transparent;--mds-calendar-cell-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-cell-disabled-background:transparent;--mds-calendar-cell-disabled-color:rgb(var(--tone-neutral-07));--mds-calendar-cell-weekend-background:transparent;--mds-calendar-cell-weekend-color:rgb(var(--tone-neutral-06));--mds-calendar-cell-size:3rem;--mds-calendar-cell-selection-boundaries-border-radius:calc(var(--mds-calendar-cell-size) / 2);--mds-calendar-cell-selection-week-boundaries-border-radius:calc(var(--mds-calendar-cell-size) / 2);--mds-calendar-cell-preselection-today-background:rgb(var(--variant-primary-09));--mds-calendar-cell-preselection-today-color:rgb(var(--variant-primary-03));--mds-calendar-cell-preselection-current-month-background:rgb(var(--variant-primary-08));--mds-calendar-cell-preselection-current-month-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-current-month-boundaries-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-current-month-boundaries-background:rgb(var(--variant-primary-10));--mds-calendar-cell-preselection-other-month-background:rgb(var(--variant-primary-09));--mds-calendar-cell-preselection-other-month-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-other-month-boundaries-color:rgb(var(--tone-neutral-05));--mds-calendar-cell-preselection-other-month-boundaries-background:rgb(var(--tone-neutral));--mds-calendar-cell-selection-current-month-background:rgb(var(--variant-primary-04));--mds-calendar-cell-selection-current-month-color:rgb(var(--tone-neutral));--mds-calendar-cell-selection-current-month-boundaries-background:rgb(var(--tone-neutral));--mds-calendar-cell-selection-current-month-boundaries-color:rgb(var(--tone-neutral-03));--mds-calendar-cell-selection-current-month-weekend-background:rgb(var(--variant-primary-03));--mds-calendar-cell-selection-current-month-weekend-color:rgb(var(--variant-primary-07));--mds-calendar-cell-selection-current-month-weekend-boundaries-background:rgb(var(--variant-primary-03));--mds-calendar-cell-selection-current-month-weekend-boundaries-color:rgb(var(--tone-neutral-03));--mds-calendar-cell-selection-other-month-background:rgb(var(--variant-primary-07));--mds-calendar-cell-selection-other-month-color:rgb(var(--tone-neutral-04));--mds-calendar-cell-selection-other-month-boundaries-background:rgb(var(--variant-primary-10));--mds-calendar-cell-selection-other-month-boundaries-color:rgb(var(--tone-neutral-05));aspect-ratio:1 / 1;display:-ms-flexbox;display:flex;padding:var(--mds-calendar-cell-boundaries-padding);position:relative}:host([month="other"]){visibility:var(--mds-calendar-cell-other-month-visibility, hidden)}.inner-dot{aspect-ratio:1 / 1;background-color:var(--mds-calendar-cell-inner-background);border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);display:-ms-flexbox;display:flex;min-height:0;min-width:0;width:100%;z-index:1}.area-background{background-color:var(--mds-calendar-cell-background);color:var(--mds-calendar-cell-color);inset:0;position:absolute;z-index:0}.action{-ms-flex-align:center;align-items:center;aspect-ratio:1 / 1;background-color:transparent;border-radius:0;color:var(--mds-calendar-cell-color);display:-ms-flexbox;display:flex;inset:calc(var(--mds-calendar-cell-gap) * -1);-ms-flex-pack:center;justify-content:center;min-height:0;min-width:0;padding:0;position:absolute;width:auto;z-index:2}:host([selection][orientation="horizontal"]) .area-background{margin-left:calc(var(--mds-calendar-cell-gap) * -1);margin-right:calc(var(--mds-calendar-cell-gap) * -1)}:host([selection="start"][orientation="horizontal"]) .area-background{border-bottom-left-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);border-top-left-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);margin-left:0}:host([selection="end"][orientation="horizontal"]) .area-background{border-bottom-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);margin-right:0}:host([selection][orientation="vertical"]) .area-background{margin-bottom:calc(var(--mds-calendar-cell-gap) * -1);margin-top:calc(var(--mds-calendar-cell-gap) * -1)}:host([selection="start"][orientation="vertical"]) .area-background{border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius) var(--mds-calendar-cell-selection-boundaries-border-radius) 0 0;margin-top:0}:host([selection="end"][orientation="vertical"]) .area-background{border-radius:0 0 var(--mds-calendar-cell-selection-boundaries-border-radius) var(--mds-calendar-cell-selection-boundaries-border-radius);margin-bottom:0}:host([orientation="vertical"]:not([selection="start"],[selection="end"])) .area-background{border-radius:0}:host(:nth-child(7n - 6)) .area-background,:host([selection="end"][orientation="horizontal"]:nth-child(7n - 6)) .area-background{border-bottom-left-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius);border-top-left-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius)}:host(:nth-child(7n)) .area-background,:host([selection="end"][orientation="horizontal"]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius);border-top-right-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius)}:host([selection="end"][orientation="horizontal"]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--mds-calendar-cell-selection-boundaries-border-radius)}:host([selection][orientation="horizontal"]:nth-child(7n - 6)) .area-background{margin-left:0}:host([selection][orientation="horizontal"]:nth-child(7n)) .area-background{margin-right:0}:host([selection="single"][orientation="horizontal"]) .area-background{border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius);margin-left:0;margin-right:0}:host(:nth-child(7n - 1)),:host(:nth-child(7n)){--mds-calendar-cell-color:var(--mds-calendar-cell-weekend-color);--mds-calendar-cell-background:var(--mds-calendar-cell-weekend-background)}:host([month="other"]:not([selection])){--mds-calendar-cell-color:var(--mds-calendar-cell-other-month-color);--mds-calendar-cell-background:var(--mds-calendar-cell-other-month-background)}:host([disabled]){--mds-calendar-cell-color:var(--mds-calendar-cell-disabled-color);--mds-calendar-cell-background:var(--mds-calendar-cell-disabled-background);cursor:auto;pointer-events:none}:host(:not([selection])[today]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-today-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-today-color)}:host([selection][month="current"]){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-current-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-color)}:host([selection][month="current"]:nth-child(7n - 1)),:host([selection][month="current"]:nth-child(7n)){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-current-month-weekend-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-weekend-color)}:host([selection="start"][month="current"]:nth-child(7n - 1)),:host([selection="end"][month="current"]:nth-child(7n - 1)),:host([selection="start"][month="current"]:nth-child(7n)),:host([selection="end"][month="current"]:nth-child(7n)){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-color)}:host([selection][month="other"]){--mds-calendar-cell-background:var(--mds-calendar-cell-selection-other-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-other-month-color)}:host([selection="start"][month="current"]),:host([selection="end"][month="current"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-selection-current-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-current-month-boundaries-color)}:host([selection="start"][month="other"]),:host([selection="end"][month="other"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-selection-other-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-selection-other-month-boundaries-color)}:host([selection][month="current"][preview]:not([preview="false"])){--mds-calendar-cell-background:var(--mds-calendar-cell-preselection-current-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-current-month-color)}:host([selection][month="other"][preview]:not([preview="false"])){--mds-calendar-cell-background:var(--mds-calendar-cell-preselection-other-month-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-other-month-color)}:host([selection="start"][month="current"][preview]:not([preview="false"])),:host([selection="end"][month="current"][preview]:not([preview="false"])){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-current-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-current-month-boundaries-color)}:host([selection="start"][month="other"][preview]:not([preview="false"])),:host([selection="end"][month="other"][preview]:not([preview="false"])){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-other-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-other-month-boundaries-color)}:host([selection="single"][month="current"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-current-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-current-month-boundaries-color)}:host([selection="single"][month="other"]){--mds-calendar-cell-inner-background:var(--mds-calendar-cell-preselection-other-month-boundaries-background);--mds-calendar-cell-color:var(--mds-calendar-cell-preselection-other-month-boundaries-color)}';var MdsCalendarCellStyle0=mdsCalendarCellCss;var MdsCalendarCell=function(){function e(e){registerInstance(this,e);this.month="current";this.orientation="horizontal";this.preview=false;this.disabled=undefined;this.today=undefined}e.prototype.render=function(){return h(Host,{key:"09389f01297dc7e38499fc5783fbe7b5be73cee5"},h("div",{key:"6501ca7b41eed8696e60156abf53f0cbbecae8d5",class:"inner-dot"}),h("div",{key:"34f8e50ba0032d7d9d3dd63aafc5ac536f1a0adf",class:"area-background"}),h("mds-button",{key:"bedafcb2817bfeac6ebee9fa3e0887a41a1bce9b",class:"action",variant:"dark",tone:"quiet",disabled:this.disabled},h("slot",{key:"197f10e47b61a6c6140774cd3e2443df61d9e4a4"})))};return e}();MdsCalendarCell.style=MdsCalendarCellStyle0;export{MdsCalendar as mds_calendar,MdsCalendarCell as mds_calendar_cell};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,r,e,a){function n(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,i){function d(t){try{s(a.next(t))}catch(t){i(t)}}function o(t){try{s(a["throw"](t))}catch(t){i(t)}}function s(t){t.done?e(t.value):n(t.value).then(d,o)}s((a=a.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,d;return d={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(t){return function(r){return s([t,r])}}function s(o){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(e=0)),e)try{if(a=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){e.label=o[1];break}if(o[0]===6&&e.label<i[1]){e.label=i[1];i=o;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(o);break}if(i[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];n=0}finally{a=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7f153b9b.js";import{m as miBaselineCalendarToday}from"./calendar-today-1a4fecdc.js";import{D as DateTime_1}from"./luxon-f19ca6e2.js";import{L as Locale}from"./locale-2adad180.js";import"./_commonjsHelpers-bdec4bbd.js";var mdsInputDateCss='@tailwind utilities; :host{--mds-input-date-background:rgb(var(--tone-neutral));--mds-input-date-field-background-empty:rgb(var(--status-error-10));--mds-input-date-field-color-empty:rgb(var(--status-error-06));--mds-input-date-icon-color:var(--mds-input-date-variant-color);--mds-input-date-ring:0 0 0 1px rgb(var(--mds-input-date-variant-color) / 0.1);--mds-input-date-shadow:0 1px 3px 0 rgb(var(--mds-input-date-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-date-variant-color) / 0.06);--mds-input-date-variant-color:0 0 0;min-height:1.5rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;gap:0.5rem;color:rgb(var(--tone-neutral-02));container-type:inline-size;display:-ms-flexbox;display:flex;overflow:visible;position:relative}.input::-webkit-calendar-picker-indicator{-webkit-appearance:none;appearance:none;-moz-appearance:textfield;display:none}.input{min-height:1.25rem;font-family:\'Roboto Mono\', \'Courier New\', monospace;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0rem;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:transparent;border:0;border-radius:0.5rem;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;overflow:hidden;text-overflow:ellipsis;-webkit-transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform, -webkit-box-shadow, -webkit-transform;width:-moz-min-content;width:-webkit-min-content;width:min-content}:host([empty]) .input{background-color:var(--mds-input-date-field-background-empty);color:var(--mds-input-date-field-color-empty)}:host([slot]){color:inherit;display:contents}:host([slot]) .input{cursor:text;text-align:center}:host(:not([slot])) .input{border-radius:0.5rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:1rem;padding-right:3rem;background-color:var(--mds-input-date-background);-webkit-box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);min-height:3rem;width:100%}:host(:focus-within) .input{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input::-moz-placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-04))}.input:-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-outer-spin-button,.input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;display:none;margin:0}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.action-open-calendar{--mds-button-color:rgb(var(--mds-input-date-icon-color));aspect-ratio:1;bottom:0;position:absolute;right:0;top:0}:host([disabled]:not([disabled="false"])) .action-open-calendar{-webkit-transform:translate(0.625rem, 0.5rem);transform:translate(0.625rem, 0.5rem)}mds-calendar{min-width:-moz-max-content;min-width:-webkit-max-content;min-width:max-content}mds-dropdown{padding:0}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}:host-context(.pref-animation-reduce) .input{-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system) .input{-webkit-transition-duration:0s;transition-duration:0s}}:host-context(.pref-theme-dark){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-dark) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-system) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}}:host-context(.pref-contrast-more){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}}@supports (-moz-appearance: none){.action-open-calendar{display:none}:host(:not([slot])) .input{padding-right:1rem}}:host{--mds-input-date-icon-color:var(--variant-primary-03);--mds-input-date-variant-color:0 0 0}:host(:focus-within){--mds-input-date-variant-color:var(--variant-primary-04)}:host([variant="info"]){--mds-input-date-icon-color:var(--status-info-05);--mds-input-date-tip-background:var(--status-info-05);--mds-input-date-variant-color:0 0 0}:host([variant="info"]:focus-within){--mds-input-date-icon-color:var(--status-info-04);--mds-input-date-variant-color:var(--status-info-05)}:host([variant="success"]){--mds-input-date-icon-color:var(--status-success-05);--mds-input-date-tip-background:var(--status-success-05);--mds-input-date-variant-color:0 0 0}:host([variant="success"]:focus-within){--mds-input-date-icon-color:var(--status-success-04);--mds-input-date-variant-color:var(--status-success-05)}:host([variant="warning"]){--mds-input-date-icon-color:var(--status-warning-05);--mds-input-date-tip-background:var(--status-warning-05);--mds-input-date-variant-color:0 0 0}:host([variant="warning"]:focus-within){--mds-input-date-icon-color:var(--status-warning-04);--mds-input-date-variant-color:var(--status-warning-05)}:host([variant="error"]){--mds-input-date-icon-color:var(--status-error-05);--mds-input-date-tip-background:var(--status-error-05);--mds-input-date-variant-color:0 0 0}:host([variant="error"]:focus-within){--mds-input-date-icon-color:var(--status-error-04);--mds-input-date-variant-color:var(--status-error-05)}';var MdsInputDateStyle0=mdsInputDateCss;var MdsInputDate=function(){function t(t){var r=this;registerInstance(this,t);this.validationEvent=createEvent(this,"mdsInputValidation",7);this.valueChange=createEvent(this,"mdsInputDateSelect",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.isSlotted=false;this.empty=undefined;this.t=new Locale({el:{},en:{},es:{},it:{}});this.touched=false;this.value="";this.variant="primary";this.min=null;this.max=null;this.delay=500;this.disabled=false;this.readonly=false;this.required=false;this.calendarKey=0;this.hasFocus=false;this.handleChange=function(t){var e=t.target;r.touched=true;if(e.value)r.value=e.value;r.validateValue(e.validity.badInput)};this.onBlur=function(t){var e=t.target;r.hasFocus=false;r.value=e.value;r.validateValue(e.validity.badInput)};this.onFocus=function(t){var e=t.target;r.hasFocus=true;if(r.readonly){setTimeout((function(){e.select()}),10)}}}t.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=this.t.lang(this.host);return[2]}))}))};t.prototype.handleValue=function(){this.valueChange.emit(this.value);this.validateValue()};t.prototype.validateValue=function(t){if(t===void 0){t=false}var r=DateTime_1.fromISO(this.value);var e=Boolean(this.value);var a=e&&!r.isValid;var n=this.required&&!e;var i=r.isValid&&(this.max&&DateTime_1.fromISO(this.max)<r||this.min&&DateTime_1.fromISO(this.min)>r);if(t||a||n||i){this.isValid=false;this.variant="error";this.internals.setFormValue(null);this.empty=t||a?true:undefined}else{this.isValid=true;this.variant="primary";this.internals.setFormValue(this.value);this.empty=undefined}this.validationEvent.emit(this.isValid)};t.prototype.focusInput=function(){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(e){r=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".input");r.focus();return[2]}))}))};t.prototype.setValue=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.value=t;this.validateValue();return[2,Promise.resolve()]}))}))};t.prototype.getErrors=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Promise.resolve(this.isValid?null:{error:""})]}))}))};t.prototype.formResetCallback=function(){this.internals.setFormValue("")};t.prototype.componentWillLoad=function(){this.isSlotted=!!this.host.getAttribute("slot");this.value=this.value||"";this.language=this.t.lang(this.host);if(this.min&&this.max){var t=DateTime_1.fromISO(this.min);var r=DateTime_1.fromISO(this.max);if(r<t){this.max=this.min}}this.validateValue()};t.prototype.render=function(){var t=this;return h(Host,{key:"52c3166d9b5401776ff61e0e535571896a9d6ba8",empty:this.empty},h("input",{key:"a4f3f1c9c3602bb977677aa3063f2968c70adf33",value:this.value,id:"dateInput",class:"input",part:"input-date",type:"date",disabled:this.disabled,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.handleChange,onChange:this.handleChange}),!this.isSlotted&&h("div",{key:"e002daf5efa4367d1519acfb566ce4faf61d4fcd",class:"action-open-calendar-wrapper"},h("mds-button",{key:"e9c6f3191dc6fcb226a3f08d8526d44900816ba5",id:"calendar-dropdown",class:"action-open-calendar",disabled:this.disabled,variant:"dark",tone:"quiet",icon:miBaselineCalendarToday,onClick:function(){t.calendarKey+=1}})),h("mds-input-tip",{key:"b4a4308288531dfb0d3b890393d5243b4687d459",lang:this.language,position:"top",active:this.hasFocus},this.disabled&&h("mds-input-tip-item",{key:"4bc411c37bb5da3465443b72db0c7915c5bb5afd",expanded:true,variant:"disabled"}),this.readonly&&h("mds-input-tip-item",{key:"6ba171f9f821354bcfbd7d9e8574dd5681a30a9b",expanded:true,variant:"readonly"}),this.required&&h("mds-input-tip-item",{key:"4f69ccf812baee84c9831f9ce3ac57d74f8a7038",expanded:this.hasFocus,variant:this.isValid?"required-success":"required"})),!this.isSlotted&&h("mds-dropdown",{key:"79f6ffd4fe2f708c9786904406e700c921200356",placement:"bottom-end","auto-placement":false,ref:function(r){return t.dropdownRef=r},target:"#calendar-dropdown"},h("mds-calendar",Object.assign({key:this.calendarKey,rangePicker:false,lang:this.language,onMdsCalendarChange:function(r){t.value=r.detail.startDate;if(t.delay===0)return;var e=t.dropdownRef;if(e){setTimeout((function(){e.visible=false}),t.delay)}},startDate:this.value},this.min?{min:this.min}:{},this.max?{max:this.max}:{}))))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["handleValue"]}},enumerable:false,configurable:true});return t}();MdsInputDate.style=MdsInputDateStyle0;export{MdsInputDate as mds_input_date};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,r,e,a){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,n){function d(t){try{s(a.next(t))}catch(t){n(t)}}function o(t){try{s(a["throw"](t))}catch(t){n(t)}}function s(t){t.done?e(t.value):i(t.value).then(d,o)}s((a=a.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,d;return d={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(t){return function(r){return s([t,r])}}function s(o){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(e=0)),e)try{if(a=1,i&&(n=o[0]&2?i["return"]:o[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;if(i=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;i=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){e.label=o[1];break}if(o[0]===6&&e.label<n[1]){e.label=n[1];n=o;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(o);break}if(n[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];i=0}finally{a=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7f153b9b.js";import{m as miBaselineCalendarToday}from"./calendar-today-1a4fecdc.js";import{D as DateTime_1}from"./luxon-f19ca6e2.js";import{L as Locale}from"./locale-2adad180.js";import"./_commonjsHelpers-bdec4bbd.js";var mdsInputDateCss='@tailwind utilities; :host{--mds-input-date-background:rgb(var(--tone-neutral));--mds-input-date-field-background-empty:rgb(var(--status-error-10));--mds-input-date-field-color-empty:rgb(var(--status-error-06));--mds-input-date-icon-color:var(--mds-input-date-variant-color);--mds-input-date-ring:0 0 0 1px rgb(var(--mds-input-date-variant-color) / 0.1);--mds-input-date-shadow:0 1px 3px 0 rgb(var(--mds-input-date-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-date-variant-color) / 0.06);--mds-input-date-variant-color:0 0 0;min-height:1.5rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;gap:0.5rem;color:rgb(var(--tone-neutral-02));container-type:inline-size;display:-ms-flexbox;display:flex;overflow:visible;position:relative}.input::-webkit-calendar-picker-indicator{-webkit-appearance:none;appearance:none;-moz-appearance:textfield;display:none}.input{min-height:1.25rem;font-family:\'Roboto Mono\', \'Courier New\', monospace;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0rem;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:transparent;border:0;border-radius:0.5rem;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;overflow:hidden;text-overflow:ellipsis;-webkit-transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform, -webkit-box-shadow, -webkit-transform;width:-moz-min-content;width:-webkit-min-content;width:min-content}:host([empty]) .input{background-color:var(--mds-input-date-field-background-empty);color:var(--mds-input-date-field-color-empty)}:host([slot]){color:inherit;display:contents}:host([slot]) .input{cursor:text;text-align:center}:host(:not([slot])) .input{border-radius:0.5rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:1rem;padding-right:3rem;background-color:var(--mds-input-date-background);-webkit-box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);min-height:3rem;width:100%}:host(:focus-within) .input{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input::-moz-placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-04))}.input:-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-outer-spin-button,.input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;display:none;margin:0}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.action-open-calendar{--mds-button-color:rgb(var(--mds-input-date-icon-color));aspect-ratio:1;bottom:0;position:absolute;right:0;top:0}:host([disabled]:not([disabled="false"])) .action-open-calendar{-webkit-transform:translate(0.625rem, 0.5rem);transform:translate(0.625rem, 0.5rem)}mds-calendar{min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;width:100cqw}mds-dropdown{padding:0}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}:host-context(.pref-animation-reduce) .input{-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system) .input{-webkit-transition-duration:0s;transition-duration:0s}}:host-context(.pref-theme-dark){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-dark) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-system) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}}:host-context(.pref-contrast-more){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}}@supports (-moz-appearance: none){.action-open-calendar{display:none}:host(:not([slot])) .input{padding-right:1rem}}:host{--mds-input-date-icon-color:var(--variant-primary-03);--mds-input-date-variant-color:0 0 0}:host(:focus-within){--mds-input-date-variant-color:var(--variant-primary-04)}:host([variant="info"]){--mds-input-date-icon-color:var(--status-info-05);--mds-input-date-tip-background:var(--status-info-05);--mds-input-date-variant-color:0 0 0}:host([variant="info"]:focus-within){--mds-input-date-icon-color:var(--status-info-04);--mds-input-date-variant-color:var(--status-info-05)}:host([variant="success"]){--mds-input-date-icon-color:var(--status-success-05);--mds-input-date-tip-background:var(--status-success-05);--mds-input-date-variant-color:0 0 0}:host([variant="success"]:focus-within){--mds-input-date-icon-color:var(--status-success-04);--mds-input-date-variant-color:var(--status-success-05)}:host([variant="warning"]){--mds-input-date-icon-color:var(--status-warning-05);--mds-input-date-tip-background:var(--status-warning-05);--mds-input-date-variant-color:0 0 0}:host([variant="warning"]:focus-within){--mds-input-date-icon-color:var(--status-warning-04);--mds-input-date-variant-color:var(--status-warning-05)}:host([variant="error"]){--mds-input-date-icon-color:var(--status-error-05);--mds-input-date-tip-background:var(--status-error-05);--mds-input-date-variant-color:0 0 0}:host([variant="error"]:focus-within){--mds-input-date-icon-color:var(--status-error-04);--mds-input-date-variant-color:var(--status-error-05)}';var MdsInputDateStyle0=mdsInputDateCss;var MdsInputDate=function(){function t(t){var r=this;registerInstance(this,t);this.validationEvent=createEvent(this,"mdsInputValidation",7);this.valueChange=createEvent(this,"mdsInputDateSelect",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.isSlotted=false;this.empty=undefined;this.t=new Locale({el:{},en:{},es:{},it:{}});this.touched=false;this.value="";this.variant="primary";this.min=null;this.max=null;this.delay=500;this.disabled=false;this.readonly=false;this.required=false;this.calendarKey=0;this.hasFocus=false;this.handleChange=function(t){var e=t.target;r.touched=true;if(e.value)r.value=e.value;r.validateValue(e.validity.badInput)};this.onBlur=function(t){var e=t.target;r.hasFocus=false;r.value=e.value;r.validateValue(e.validity.badInput)};this.onFocus=function(t){var e=t.target;r.hasFocus=true;if(r.readonly){setTimeout((function(){e.select()}),10)}}}t.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=this.t.lang(this.host);return[2]}))}))};t.prototype.handleValue=function(){this.valueChange.emit(this.value);this.validateValue()};t.prototype.validateValue=function(t){if(t===void 0){t=false}var r=DateTime_1.fromISO(this.value);var e=Boolean(this.value);var a=e&&!r.isValid;var i=this.required&&!e;var n=r.isValid&&(this.max&&DateTime_1.fromISO(this.max)<r||this.min&&DateTime_1.fromISO(this.min)>r);if(t||a||i||n){this.isValid=false;this.variant="error";this.internals.setFormValue(null);this.empty=t||a?true:undefined}else{this.isValid=true;this.variant="primary";this.internals.setFormValue(this.value);this.empty=undefined}this.validationEvent.emit(this.isValid)};t.prototype.focusInput=function(){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(e){r=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".input");r.focus();return[2]}))}))};t.prototype.setValue=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.value=t;this.validateValue();return[2,Promise.resolve()]}))}))};t.prototype.getErrors=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Promise.resolve(this.isValid?null:{error:""})]}))}))};t.prototype.formResetCallback=function(){this.internals.setFormValue("")};t.prototype.componentWillLoad=function(){this.isSlotted=!!this.host.getAttribute("slot");this.value=this.value||"";this.language=this.t.lang(this.host);if(this.min&&this.max){var t=DateTime_1.fromISO(this.min);var r=DateTime_1.fromISO(this.max);if(r<t){this.max=this.min}}this.validateValue()};t.prototype.render=function(){var t=this;return h(Host,{key:"52c3166d9b5401776ff61e0e535571896a9d6ba8",empty:this.empty},h("input",{key:"a4f3f1c9c3602bb977677aa3063f2968c70adf33",value:this.value,id:"dateInput",class:"input",part:"input-date",type:"date",disabled:this.disabled,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.handleChange,onChange:this.handleChange}),!this.isSlotted&&h("div",{key:"e002daf5efa4367d1519acfb566ce4faf61d4fcd",class:"action-open-calendar-wrapper"},h("mds-button",{key:"e9c6f3191dc6fcb226a3f08d8526d44900816ba5",id:"calendar-dropdown",class:"action-open-calendar",disabled:this.disabled,variant:"dark",tone:"quiet",icon:miBaselineCalendarToday,onClick:function(){t.calendarKey+=1}})),h("mds-input-tip",{key:"b4a4308288531dfb0d3b890393d5243b4687d459",lang:this.language,position:"top",active:this.hasFocus},this.disabled&&h("mds-input-tip-item",{key:"4bc411c37bb5da3465443b72db0c7915c5bb5afd",expanded:true,variant:"disabled"}),this.readonly&&h("mds-input-tip-item",{key:"6ba171f9f821354bcfbd7d9e8574dd5681a30a9b",expanded:true,variant:"readonly"}),this.required&&h("mds-input-tip-item",{key:"4f69ccf812baee84c9831f9ce3ac57d74f8a7038",expanded:this.hasFocus,variant:this.isValid?"required-success":"required"})),!this.isSlotted&&h("mds-dropdown",{key:"79f6ffd4fe2f708c9786904406e700c921200356",placement:"bottom-end","auto-placement":false,ref:function(r){return t.dropdownRef=r},target:"#calendar-dropdown"},h("mds-calendar",Object.assign({key:this.calendarKey,rangePicker:false,lang:this.language,onMdsCalendarChange:function(r){t.value=r.detail.startDate;if(t.delay===0)return;var e=t.dropdownRef;if(e){setTimeout((function(){e.visible=false}),t.delay)}},startDate:this.value},this.min?{min:this.min}:{},this.max?{max:this.max}:{}))))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["handleValue"]}},enumerable:false,configurable:true});return t}();MdsInputDate.style=MdsInputDateStyle0;export{MdsInputDate as mds_input_date};
|
package/dist/hydrate/index.js
CHANGED
|
@@ -14228,7 +14228,7 @@ const sanitizeISO8601Date = (dateString) => {
|
|
|
14228
14228
|
return new Date(dateString).toISOString();
|
|
14229
14229
|
};
|
|
14230
14230
|
|
|
14231
|
-
const mdsCalendarCss = ":host{--mds-calendar-day-number-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-day-number-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-gap:0.125rem;--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:0.5rem;--mds-calendar-background:rgb(var(--tone-neutral));--mds-calendar-padding:1rem;--mds-calendar-select-month-or-year-height:2.25rem;--mds-calendar-select-month-or-year-width:14rem;background-color:rgb(var(--tone-neutral-09));border-radius:var(--mds-calendar-border-radius);cursor:auto;display:-ms-inline-flexbox;display:inline-flex;max-width:380px;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background);border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;-ms-flex:1 1 auto;flex:1 1 auto;padding:var(--mds-calendar-padding)}.calendar-preselection{display:none;gap:0.125rem;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;padding:var(--mds-calendar-padding)}.calendar-preselection--has-preselection{display:grid}nav{display:-ms-flexbox;display:flex;gap:0.5rem;-ms-flex-pack:justify;justify-content:space-between;min-width:0}.action{padding-left:0.5rem;padding-right:0.5rem;-ms-flex-pack:left;justify-content:left;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content}.action-back,.action-forward{-ms-flex-negative:0;flex-shrink:0}.select-month-or-year{-ms-flex-align:stretch;align-items:stretch;background-color:rgb(var(--tone-neutral-09));block-size:var(--mds-calendar-select-month-or-year-height);border-radius:var(--mds-calendar-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--mds-calendar-select-month-or-year-width);flex:0 0 var(--mds-calendar-select-month-or-year-width);height:var(--mds-calendar-select-month-or-year-height)
|
|
14231
|
+
const mdsCalendarCss = ":host{--mds-calendar-day-number-other-month-color:rgb(var(--tone-neutral-07));--mds-calendar-day-number-color:rgb(var(--tone-neutral-01));--mds-calendar-cell-gap:0.125rem;--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:0.5rem;--mds-calendar-background:rgb(var(--tone-neutral));--mds-calendar-padding:1rem;--mds-calendar-select-month-or-year-height:2.25rem;--mds-calendar-select-month-or-year-width:14rem;background-color:rgb(var(--tone-neutral-09));border-radius:var(--mds-calendar-border-radius);cursor:auto;display:-ms-inline-flexbox;display:inline-flex;inline-size:100%;max-width:380px;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background);border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;-ms-flex:1 1 auto;flex:1 1 auto;padding:var(--mds-calendar-padding)}.calendar-preselection{display:none;gap:0.125rem;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;padding:var(--mds-calendar-padding)}.calendar-preselection--has-preselection{display:grid}nav{display:-ms-flexbox;display:flex;gap:0.5rem;-ms-flex-pack:justify;justify-content:space-between;min-width:0}.action{padding-left:0.5rem;padding-right:0.5rem;-ms-flex-pack:left;justify-content:left;min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content}.action-back,.action-forward{-ms-flex-negative:0;flex-shrink:0}.select-month-or-year{-ms-flex-align:stretch;align-items:stretch;background-color:rgb(var(--tone-neutral-09));block-size:var(--mds-calendar-select-month-or-year-height);border-radius:var(--mds-calendar-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--mds-calendar-select-month-or-year-width);flex:0 0 var(--mds-calendar-select-month-or-year-width);height:var(--mds-calendar-select-month-or-year-height);inline-size:var(--mds-calendar-select-month-or-year-width);-ms-flex-pack:start;justify-content:flex-start;max-block-size:var(--mds-calendar-select-month-or-year-height);max-height:var(--mds-calendar-select-month-or-year-height);max-inline-size:var(--mds-calendar-select-month-or-year-width);min-block-size:var(--mds-calendar-select-month-or-year-height);min-height:var(--mds-calendar-select-month-or-year-height);min-inline-size:var(--mds-calendar-select-month-or-year-width);overflow:hidden}.action-month,.action-year{--mds-button-radius:0;-ms-flex-item-align:stretch;align-self:stretch;block-size:100%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:default;height:100%;max-block-size:100%;max-height:100%;min-block-size:0;min-height:0;padding-left:0.5rem;padding-right:0.5rem}.action-month{-ms-flex:1 1 auto;flex:1 1 auto;min-width:0}.action-year{-ms-flex:0 0 4.5rem;flex:0 0 4.5rem}.action-month::part(label),.action-year::part(label){overflow:visible;text-overflow:clip;white-space:nowrap}.week-day-name{-ms-flex-align:center;align-items:center;block-size:3rem;inline-size:100%;min-height:auto;padding:0}.month-view{display:grid}.month-view__days-names,.month-view__cells{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(7, minmax(1px, 100%));min-width:0}.month-view{display:grid}.month-view__month-names,.month-view__years{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(3, minmax(1px, 100%));min-width:0}";
|
|
14232
14232
|
var MdsCalendarStyle0 = mdsCalendarCss;
|
|
14233
14233
|
|
|
14234
14234
|
class MdsCalendar {
|
|
@@ -33230,37 +33230,44 @@ function promisifyRequest(request) {
|
|
|
33230
33230
|
// @ts-ignore - file size hacks
|
|
33231
33231
|
request.oncomplete = request.onsuccess = function () {
|
|
33232
33232
|
return resolve(request.result);
|
|
33233
|
-
};
|
|
33234
|
-
|
|
33235
|
-
|
|
33233
|
+
};
|
|
33234
|
+
// @ts-ignore - file size hacks
|
|
33236
33235
|
request.onabort = request.onerror = function () {
|
|
33237
33236
|
return reject(request.error);
|
|
33238
33237
|
};
|
|
33239
33238
|
});
|
|
33240
33239
|
}
|
|
33241
|
-
|
|
33242
33240
|
function createStore(dbName, storeName) {
|
|
33243
|
-
var
|
|
33244
|
-
|
|
33245
|
-
|
|
33246
|
-
|
|
33241
|
+
var dbp;
|
|
33242
|
+
var getDB = function getDB() {
|
|
33243
|
+
if (dbp) return dbp;
|
|
33244
|
+
var request = indexedDB.open(dbName);
|
|
33245
|
+
request.onupgradeneeded = function () {
|
|
33246
|
+
return request.result.createObjectStore(storeName);
|
|
33247
|
+
};
|
|
33248
|
+
dbp = promisifyRequest(request);
|
|
33249
|
+
dbp.then(function (db) {
|
|
33250
|
+
// It seems like Safari sometimes likes to just close the connection.
|
|
33251
|
+
// It's supposed to fire this event when that happens. Let's hope it does!
|
|
33252
|
+
db.onclose = function () {
|
|
33253
|
+
return dbp = undefined;
|
|
33254
|
+
};
|
|
33255
|
+
}, function () {
|
|
33256
|
+
dbp = undefined;
|
|
33257
|
+
});
|
|
33258
|
+
return dbp;
|
|
33247
33259
|
};
|
|
33248
|
-
|
|
33249
|
-
var dbp = promisifyRequest(request);
|
|
33250
33260
|
return function (txMode, callback) {
|
|
33251
|
-
return
|
|
33261
|
+
return getDB().then(function (db) {
|
|
33252
33262
|
return callback(db.transaction(storeName, txMode).objectStore(storeName));
|
|
33253
33263
|
});
|
|
33254
33264
|
};
|
|
33255
33265
|
}
|
|
33256
|
-
|
|
33257
33266
|
var defaultGetStoreFunc;
|
|
33258
|
-
|
|
33259
33267
|
function defaultGetStore() {
|
|
33260
33268
|
if (!defaultGetStoreFunc) {
|
|
33261
33269
|
defaultGetStoreFunc = createStore('keyval-store', 'keyval');
|
|
33262
33270
|
}
|
|
33263
|
-
|
|
33264
33271
|
return defaultGetStoreFunc;
|
|
33265
33272
|
}
|
|
33266
33273
|
/**
|
|
@@ -33269,8 +33276,6 @@ function defaultGetStore() {
|
|
|
33269
33276
|
* @param key
|
|
33270
33277
|
* @param customStore Method to get a custom store. Use with caution (see the docs).
|
|
33271
33278
|
*/
|
|
33272
|
-
|
|
33273
|
-
|
|
33274
33279
|
function get(key) {
|
|
33275
33280
|
var customStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetStore();
|
|
33276
33281
|
return customStore('readonly', function (store) {
|
|
@@ -33284,8 +33289,6 @@ function get(key) {
|
|
|
33284
33289
|
* @param value
|
|
33285
33290
|
* @param customStore Method to get a custom store. Use with caution (see the docs).
|
|
33286
33291
|
*/
|
|
33287
|
-
|
|
33288
|
-
|
|
33289
33292
|
function set(key, value) {
|
|
33290
33293
|
var customStore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultGetStore();
|
|
33291
33294
|
return customStore('readwrite', function (store) {
|
|
@@ -33299,8 +33302,6 @@ function set(key, value) {
|
|
|
33299
33302
|
* @param key
|
|
33300
33303
|
* @param customStore Method to get a custom store. Use with caution (see the docs).
|
|
33301
33304
|
*/
|
|
33302
|
-
|
|
33303
|
-
|
|
33304
33305
|
function del(key) {
|
|
33305
33306
|
var customStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetStore();
|
|
33306
33307
|
return customStore('readwrite', function (store) {
|
|
@@ -33402,29 +33403,46 @@ class IconsSetController {
|
|
|
33402
33403
|
return { set: this._iconsSets.get(iconName.split('/')[0]) };
|
|
33403
33404
|
}
|
|
33404
33405
|
/**
|
|
33405
|
-
*
|
|
33406
|
+
* Sets the directory of the svg files. Query and fragment are dropped: the icon name is
|
|
33407
|
+
* appended to the path.
|
|
33406
33408
|
*
|
|
33407
|
-
* input path: https://www.abc.com/svg/path
|
|
33408
|
-
* svgPath =
|
|
33409
|
+
* input path: https://www.abc.com/svg/path/
|
|
33410
|
+
* svgPath = https://www.abc.com/svg/path/
|
|
33409
33411
|
*
|
|
33410
|
-
* input path: localhost:9000/svg/path
|
|
33411
|
-
* svgPath = localhost:9000/svg/path
|
|
33412
|
+
* input path: localhost:9000/svg/path/
|
|
33413
|
+
* svgPath = //localhost:9000/svg/path/ (with the protocol of the page)
|
|
33412
33414
|
*
|
|
33413
|
-
* input path: /svg/path
|
|
33414
|
-
* svgPath =
|
|
33415
|
+
* input path: /svg/path/ or svg/path/
|
|
33416
|
+
* svgPath = unchanged, resolved by `fetch` against the document base URL on each request
|
|
33415
33417
|
*
|
|
33416
|
-
* input path:
|
|
33418
|
+
* input path: empty or not a URL
|
|
33417
33419
|
* throw error
|
|
33418
|
-
*
|
|
33419
33420
|
*/
|
|
33420
33421
|
setSvgPath(svgPath) {
|
|
33421
|
-
const
|
|
33422
|
-
|
|
33423
|
-
|
|
33424
|
-
|
|
33422
|
+
const error = Error(`Svg path not recognize ${svgPath}, ensure is a absolute path starting with '/' or a url`);
|
|
33423
|
+
if (typeof svgPath !== 'string' || svgPath.trim() === '') {
|
|
33424
|
+
throw error;
|
|
33425
|
+
}
|
|
33426
|
+
const value = svgPath.trim();
|
|
33427
|
+
// a host with a port and no scheme (`localhost:9000/svg/`) would be read as the scheme `localhost:`
|
|
33428
|
+
const path = /^[\w.-]+:\d+(\/|$)/.test(value) ? `//${value}` : value;
|
|
33429
|
+
let url;
|
|
33430
|
+
try {
|
|
33431
|
+
// the placeholder base only validates a path, which is kept as it is
|
|
33432
|
+
url = new URL(path, 'http://localhost/');
|
|
33433
|
+
}
|
|
33434
|
+
catch (_a) {
|
|
33435
|
+
throw error;
|
|
33425
33436
|
}
|
|
33426
33437
|
if (typeof window !== 'undefined') {
|
|
33427
|
-
|
|
33438
|
+
if (/^[a-z][a-z\d+.-]*:/i.test(path)) {
|
|
33439
|
+
url.search = '';
|
|
33440
|
+
url.hash = '';
|
|
33441
|
+
this._svgPath = url.href;
|
|
33442
|
+
}
|
|
33443
|
+
else {
|
|
33444
|
+
this._svgPath = path.replace(/[?#].*$/, '');
|
|
33445
|
+
}
|
|
33428
33446
|
window.dispatchEvent(new Event(this._svgPathUpdate));
|
|
33429
33447
|
}
|
|
33430
33448
|
}
|
|
@@ -33452,9 +33470,14 @@ class IconsSetController {
|
|
|
33452
33470
|
this.setSvgPath((_a = window.sessionStorage.getItem(IconsSetService._svgPathKey)) !== null && _a !== void 0 ? _a : '');
|
|
33453
33471
|
}
|
|
33454
33472
|
const src = this._svgPath && !name.startsWith('http') ? this._svgPath.concat(name, '.svg') : name;
|
|
33473
|
+
// Memory first: every instance of an icon already loaded skips the IndexedDB round-trip
|
|
33474
|
+
if (this.memoryCache[src]) {
|
|
33475
|
+
return this.memoryCache[src];
|
|
33476
|
+
}
|
|
33455
33477
|
const lsCache = await this.isCacheAvailable(src);
|
|
33456
|
-
if (
|
|
33457
|
-
|
|
33478
|
+
if (lsCache) {
|
|
33479
|
+
this.memoryCache[src] = lsCache;
|
|
33480
|
+
return lsCache;
|
|
33458
33481
|
}
|
|
33459
33482
|
const response = await fetch(src);
|
|
33460
33483
|
if (!response.ok) {
|
|
@@ -34406,7 +34429,7 @@ class MdsInput {
|
|
|
34406
34429
|
|
|
34407
34430
|
var miBaselineCalendarToday = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>`;
|
|
34408
34431
|
|
|
34409
|
-
const mdsInputDateCss = "@tailwind utilities; :host{--mds-input-date-background:rgb(var(--tone-neutral));--mds-input-date-field-background-empty:rgb(var(--status-error-10));--mds-input-date-field-color-empty:rgb(var(--status-error-06));--mds-input-date-icon-color:var(--mds-input-date-variant-color);--mds-input-date-ring:0 0 0 1px rgb(var(--mds-input-date-variant-color) / 0.1);--mds-input-date-shadow:0 1px 3px 0 rgb(var(--mds-input-date-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-date-variant-color) / 0.06);--mds-input-date-variant-color:0 0 0;min-height:1.5rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;gap:0.5rem;color:rgb(var(--tone-neutral-02));container-type:inline-size;display:-ms-flexbox;display:flex;overflow:visible;position:relative}.input::-webkit-calendar-picker-indicator{-webkit-appearance:none;appearance:none;-moz-appearance:textfield;display:none}.input{min-height:1.25rem;font-family:'Roboto Mono', 'Courier New', monospace;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0rem;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:transparent;border:0;border-radius:0.5rem;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;overflow:hidden;text-overflow:ellipsis;-webkit-transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform, -webkit-box-shadow, -webkit-transform;width:-moz-min-content;width:-webkit-min-content;width:min-content}:host([empty]) .input{background-color:var(--mds-input-date-field-background-empty);color:var(--mds-input-date-field-color-empty)}:host([slot]){color:inherit;display:contents}:host([slot]) .input{cursor:text;text-align:center}:host(:not([slot])) .input{border-radius:0.5rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:1rem;padding-right:3rem;background-color:var(--mds-input-date-background);-webkit-box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);min-height:3rem;width:100%}:host(:focus-within) .input{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input::-moz-placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-04))}.input:-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-outer-spin-button,.input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;display:none;margin:0}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.action-open-calendar{--mds-button-color:rgb(var(--mds-input-date-icon-color));aspect-ratio:1;bottom:0;position:absolute;right:0;top:0}:host([disabled]:not([disabled=\"false\"])) .action-open-calendar{-webkit-transform:translate(0.625rem, 0.5rem);transform:translate(0.625rem, 0.5rem)}mds-calendar{min-width:-moz-max-content;min-width:-webkit-max-content;min-width:max-content}mds-dropdown{padding:0}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}:host-context(.pref-animation-reduce) .input{-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system) .input{-webkit-transition-duration:0s;transition-duration:0s}}:host-context(.pref-theme-dark){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-dark) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-system) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}}:host-context(.pref-contrast-more){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}}@supports (-moz-appearance: none){.action-open-calendar{display:none}:host(:not([slot])) .input{padding-right:1rem}}:host{--mds-input-date-icon-color:var(--variant-primary-03);--mds-input-date-variant-color:0 0 0}:host(:focus-within){--mds-input-date-variant-color:var(--variant-primary-04)}:host([variant=\"info\"]){--mds-input-date-icon-color:var(--status-info-05);--mds-input-date-tip-background:var(--status-info-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"info\"]:focus-within){--mds-input-date-icon-color:var(--status-info-04);--mds-input-date-variant-color:var(--status-info-05)}:host([variant=\"success\"]){--mds-input-date-icon-color:var(--status-success-05);--mds-input-date-tip-background:var(--status-success-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"success\"]:focus-within){--mds-input-date-icon-color:var(--status-success-04);--mds-input-date-variant-color:var(--status-success-05)}:host([variant=\"warning\"]){--mds-input-date-icon-color:var(--status-warning-05);--mds-input-date-tip-background:var(--status-warning-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"warning\"]:focus-within){--mds-input-date-icon-color:var(--status-warning-04);--mds-input-date-variant-color:var(--status-warning-05)}:host([variant=\"error\"]){--mds-input-date-icon-color:var(--status-error-05);--mds-input-date-tip-background:var(--status-error-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"error\"]:focus-within){--mds-input-date-icon-color:var(--status-error-04);--mds-input-date-variant-color:var(--status-error-05)}";
|
|
34432
|
+
const mdsInputDateCss = "@tailwind utilities; :host{--mds-input-date-background:rgb(var(--tone-neutral));--mds-input-date-field-background-empty:rgb(var(--status-error-10));--mds-input-date-field-color-empty:rgb(var(--status-error-06));--mds-input-date-icon-color:var(--mds-input-date-variant-color);--mds-input-date-ring:0 0 0 1px rgb(var(--mds-input-date-variant-color) / 0.1);--mds-input-date-shadow:0 1px 3px 0 rgb(var(--mds-input-date-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-date-variant-color) / 0.06);--mds-input-date-variant-color:0 0 0;min-height:1.5rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;gap:0.5rem;color:rgb(var(--tone-neutral-02));container-type:inline-size;display:-ms-flexbox;display:flex;overflow:visible;position:relative}.input::-webkit-calendar-picker-indicator{-webkit-appearance:none;appearance:none;-moz-appearance:textfield;display:none}.input{min-height:1.25rem;font-family:'Roboto Mono', 'Courier New', monospace;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0rem;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:transparent;border:0;border-radius:0.5rem;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;overflow:hidden;text-overflow:ellipsis;-webkit-transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform;transition-property:background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform, -webkit-box-shadow, -webkit-transform;width:-moz-min-content;width:-webkit-min-content;width:min-content}:host([empty]) .input{background-color:var(--mds-input-date-field-background-empty);color:var(--mds-input-date-field-color-empty)}:host([slot]){color:inherit;display:contents}:host([slot]) .input{cursor:text;text-align:center}:host(:not([slot])) .input{border-radius:0.5rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:1rem;padding-right:3rem;background-color:var(--mds-input-date-background);-webkit-box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);box-shadow:var(--mds-input-date-ring), var(--mds-input-date-shadow);min-height:3rem;width:100%}:host(:focus-within) .input{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-date-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color) / 1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-date-variant-color) / 0.06)}.input::-moz-placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-04))}.input:-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::-ms-input-placeholder{color:rgb(var(--tone-neutral-04))}.input::placeholder{color:rgb(var(--tone-neutral-04))}.input::-webkit-outer-spin-button,.input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;display:none;margin:0}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.action-open-calendar{--mds-button-color:rgb(var(--mds-input-date-icon-color));aspect-ratio:1;bottom:0;position:absolute;right:0;top:0}:host([disabled]:not([disabled=\"false\"])) .action-open-calendar{-webkit-transform:translate(0.625rem, 0.5rem);transform:translate(0.625rem, 0.5rem)}mds-calendar{min-width:-moz-min-content;min-width:-webkit-min-content;min-width:min-content;width:100cqw}mds-dropdown{padding:0}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}:host-context(.pref-animation-reduce) .input{-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system) .input{-webkit-transition-duration:0s;transition-duration:0s}}:host-context(.pref-theme-dark){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-dark) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06))}:host-context(.pref-theme-system) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08))}}:host-context(.pref-contrast-more){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}@media (prefers-contrast: more){:host-context(.pref-contrast-system){--mds-input-date-ring:0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);--mds-input-date-background:rgb(var(--tone-neutral-09));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05))}:host-context(.pref-contrast-more) .input::-moz-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input:-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::-ms-input-placeholder{color:rgb(var(--tone-neutral-03))}:host-context(.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03))}}@supports (-moz-appearance: none){.action-open-calendar{display:none}:host(:not([slot])) .input{padding-right:1rem}}:host{--mds-input-date-icon-color:var(--variant-primary-03);--mds-input-date-variant-color:0 0 0}:host(:focus-within){--mds-input-date-variant-color:var(--variant-primary-04)}:host([variant=\"info\"]){--mds-input-date-icon-color:var(--status-info-05);--mds-input-date-tip-background:var(--status-info-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"info\"]:focus-within){--mds-input-date-icon-color:var(--status-info-04);--mds-input-date-variant-color:var(--status-info-05)}:host([variant=\"success\"]){--mds-input-date-icon-color:var(--status-success-05);--mds-input-date-tip-background:var(--status-success-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"success\"]:focus-within){--mds-input-date-icon-color:var(--status-success-04);--mds-input-date-variant-color:var(--status-success-05)}:host([variant=\"warning\"]){--mds-input-date-icon-color:var(--status-warning-05);--mds-input-date-tip-background:var(--status-warning-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"warning\"]:focus-within){--mds-input-date-icon-color:var(--status-warning-04);--mds-input-date-variant-color:var(--status-warning-05)}:host([variant=\"error\"]){--mds-input-date-icon-color:var(--status-error-05);--mds-input-date-tip-background:var(--status-error-05);--mds-input-date-variant-color:0 0 0}:host([variant=\"error\"]:focus-within){--mds-input-date-icon-color:var(--status-error-04);--mds-input-date-variant-color:var(--status-error-05)}";
|
|
34410
34433
|
var MdsInputDateStyle0 = mdsInputDateCss;
|
|
34411
34434
|
|
|
34412
34435
|
// TODO add input validation manager for error message
|