@maggioli-design-system/magma 1.11.2 → 1.11.4

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.
Files changed (31) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/magma-components.cjs.js +1 -1
  3. package/dist/cjs/mds-input-date.cjs.entry.js +32 -21
  4. package/dist/cjs/mds-input.cjs.entry.js +10 -10
  5. package/dist/collection/components/mds-input/mds-input.js +10 -10
  6. package/dist/collection/components/mds-input-date/mds-input-date.js +68 -21
  7. package/dist/components/mds-input-date.js +34 -22
  8. package/dist/components/mds-input2.js +10 -10
  9. package/dist/documentation.json +47 -1
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/magma-components.js +1 -1
  12. package/dist/esm/mds-input-date.entry.js +32 -21
  13. package/dist/esm/mds-input.entry.js +10 -10
  14. package/dist/esm-es5/loader.js +1 -1
  15. package/dist/esm-es5/magma-components.js +1 -1
  16. package/dist/esm-es5/mds-input-date.entry.js +1 -1
  17. package/dist/esm-es5/mds-input.entry.js +1 -1
  18. package/dist/hydrate/index.js +44 -32
  19. package/dist/hydrate/index.mjs +44 -32
  20. package/dist/magma-components/magma-components.esm.js +1 -1
  21. package/dist/magma-components/p-26cd6ec8.system.js +1 -1
  22. package/dist/magma-components/{p-f84a0816.system.entry.js → p-409c9518.system.entry.js} +1 -1
  23. package/dist/magma-components/p-80b11d2e.entry.js +1 -0
  24. package/dist/magma-components/p-977d3bf0.entry.js +1 -0
  25. package/dist/magma-components/{p-8115a5c3.system.entry.js → p-9e08e8f1.system.entry.js} +1 -1
  26. package/dist/stats.json +109 -27
  27. package/dist/types/components/mds-input-date/mds-input-date.d.ts +8 -1
  28. package/dist/types/components.d.ts +8 -2
  29. package/package.json +1 -1
  30. package/dist/magma-components/p-83563864.entry.js +0 -1
  31. package/dist/magma-components/p-987e1cd6.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,c as r,h as e,H as a,g as d}from"./p-3a6b32e7.js";import{m as i}from"./p-d2f61b1f.js";import{D as o}from"./p-3833e170.js";import{L as n}from"./p-2d77deaf.js";import"./p-85aa8e05.js";const s=class{constructor(e){t(this,e),this.valueChange=r(this,"mdsInputDateSelect",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.isSlotted=!1,this.t=new n({el:{},en:{},es:{},it:{}}),this.touched=!1,this.value="",this.variant="primary",this.min=null,this.max=null,this.delay=500,this.disabled=!1,this.readonly=!1,this.required=!1,this.calendarKey=0,this.hasFocus=!1,this.onBlur=t=>{const r=t.target;this.hasFocus=!1,this.value=r.value},this.onFocus=t=>{const r=t.target;this.hasFocus=!0,this.readonly&&setTimeout((()=>{r.select()}),10)}}async updateLang(){this.language=this.t.lang(this.host)}handleValue(){this.valueChange.emit(this.value),this.validateValue(),this.internals.setFormValue(this.value)}validateValue(){const t=o.fromISO(this.value);this.isValid=!1,this.variant="error",t.invalid&&this.required||this.max&&o.fromISO(this.max)<t||this.min&&o.fromISO(this.min)>t||(this.isValid=!0,this.variant="primary")}async focusInput(){var t;(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".input")).focus()}async setValue(t){return this.value=t,this.validateValue(),Promise.resolve()}componentWillLoad(){if(this.isSlotted=!!this.host.getAttribute("slot"),this.value=this.value||"",this.language=this.t.lang(this.host),this.min&&this.max){const t=o.fromISO(this.min);o.fromISO(this.max)<t&&(this.max=this.min)}this.validateValue()}handleChange(t){const r=t.target;this.touched=!0,r.value&&(this.value=r.value),this.validateValue()}render(){return e(a,{key:"5c8a9e0aa8f76679abfbdaa2c709ae11312ee46d"},e("input",{key:"1f6dddc1ed8477f8b6160d90f7bf15c6d711ef95",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&&e("mds-button",{key:"caefb1f5d8da17ea06dfc547902e19900cd02abf",id:"calendar-dropdown",class:"action-open-calendar",disabled:this.disabled,variant:"dark",tone:"quiet",icon:i,onClick:()=>{this.calendarKey+=1}}),e("mds-input-tip",{key:"3f60d0e56e101776b19c1564d92f361b3f0178d7",lang:this.language,position:"top",active:this.hasFocus},this.disabled&&e("mds-input-tip-item",{key:"25a86b26eb2bd743d0291ff1514828274d13ae17",expanded:!0,variant:"disabled"}),this.readonly&&e("mds-input-tip-item",{key:"c63d2f830dec87f180bc828b16cebd8e8d8a7060",expanded:!0,variant:"readonly"}),this.required&&e("mds-input-tip-item",{key:"2d2e3f021e3e4ef8c99be55132edf4f99be3b900",expanded:this.hasFocus,variant:this.isValid?"required-success":"required"})),!this.isSlotted&&e("mds-dropdown",{key:"370a33a1f273a3eafc045c1e62c84db41ff52c23",placement:"bottom-end","auto-placement":!1,ref:t=>this.dropdownRef=t,target:"#calendar-dropdown"},e("mds-calendar",Object.assign({key:this.calendarKey,rangePicker:!1,lang:this.language,onMdsCalendarChange:t=>{if(this.value=t.detail.startDate,0===this.delay)return;const{dropdownRef:r}=this;r&&setTimeout((()=>{r.visible=!1}),this.delay)},startDate:this.value},this.min?{min:this.min}:{},this.max?{max:this.max}:{}))))}static get formAssociated(){return!0}get host(){return d(this)}static get watchers(){return{value:["handleValue"]}}};s.style='@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)}';export{s as mds_input_date}