@moni-labs/moni-ui 0.4.1 → 0.4.2

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 (64) hide show
  1. package/README.md +28 -3
  2. package/custom-elements.json +6 -6
  3. package/dist/cdn/chunks/base-BIpe3L86.js +1 -0
  4. package/dist/cdn/chunks/class-map-DBljv-_e.js +1 -0
  5. package/dist/cdn/chunks/decorate-DxX3e27g.js +738 -0
  6. package/dist/cdn/chunks/directive-BSZPiF1A.js +1 -0
  7. package/dist/cdn/chunks/event-emitter-CGhsijUg.js +1 -0
  8. package/dist/cdn/chunks/gsap-DWxn8li7.js +1 -0
  9. package/dist/cdn/chunks/if-defined-CuEAJKpp.js +1 -0
  10. package/dist/cdn/chunks/live-B7Rjg1kt.js +1 -0
  11. package/dist/cdn/chunks/query-SWT-tzvq.js +1 -0
  12. package/dist/cdn/chunks/query-assigned-elements-BBHe1xEY.js +1 -0
  13. package/dist/cdn/components/moni-app-bar.js +118 -0
  14. package/dist/cdn/components/moni-badge.js +69 -0
  15. package/dist/cdn/components/moni-bottom-sheet.js +143 -0
  16. package/dist/cdn/components/moni-button-group.js +56 -0
  17. package/dist/cdn/components/moni-button-segment.js +272 -0
  18. package/dist/cdn/components/moni-button.js +602 -0
  19. package/dist/cdn/components/moni-card.js +143 -0
  20. package/dist/cdn/components/moni-carousel.js +311 -0
  21. package/dist/cdn/components/moni-checkbox.js +137 -0
  22. package/dist/cdn/components/moni-chip.js +218 -0
  23. package/dist/cdn/components/moni-color-field.js +54 -0
  24. package/dist/cdn/components/moni-context-menu.js +24 -0
  25. package/dist/cdn/components/moni-dialog.js +191 -0
  26. package/dist/cdn/components/moni-divider.js +32 -0
  27. package/dist/cdn/components/moni-expansion.js +50 -0
  28. package/dist/cdn/components/moni-fab-menu.js +57 -0
  29. package/dist/cdn/components/moni-fab.js +103 -0
  30. package/dist/cdn/components/moni-file-field.js +45 -0
  31. package/dist/cdn/components/moni-icon.js +55 -0
  32. package/dist/cdn/components/moni-list-item.js +144 -0
  33. package/dist/cdn/components/moni-list.js +16 -0
  34. package/dist/cdn/components/moni-loading-indicator.js +134 -0
  35. package/dist/cdn/components/moni-menu-item.js +45 -0
  36. package/dist/cdn/components/moni-menu.js +165 -0
  37. package/dist/cdn/components/moni-morph-modal.js +157 -0
  38. package/dist/cdn/components/moni-nav-item.js +153 -0
  39. package/dist/cdn/components/moni-nav.js +161 -0
  40. package/dist/cdn/components/moni-progress.js +420 -0
  41. package/dist/cdn/components/moni-radio.js +154 -0
  42. package/dist/cdn/components/moni-ripple.js +55 -0
  43. package/dist/cdn/components/moni-segmented-button.js +32 -0
  44. package/dist/cdn/components/moni-select-option.js +47 -0
  45. package/dist/cdn/components/moni-select.js +503 -0
  46. package/dist/cdn/components/moni-shape.js +99 -0
  47. package/dist/cdn/components/moni-side-sheet.js +234 -0
  48. package/dist/cdn/components/moni-slider.js +252 -0
  49. package/dist/cdn/components/moni-snackbar.js +91 -0
  50. package/dist/cdn/components/moni-split-button.js +110 -0
  51. package/dist/cdn/components/moni-step.js +111 -0
  52. package/dist/cdn/components/moni-stepper.js +25 -0
  53. package/dist/cdn/components/moni-switch.js +169 -0
  54. package/dist/cdn/components/moni-tab.js +93 -0
  55. package/dist/cdn/components/moni-tabs.js +38 -0
  56. package/dist/cdn/components/moni-text-field.js +83 -0
  57. package/dist/cdn/components/moni-textarea.js +46 -0
  58. package/dist/cdn/components/moni-time-picker.js +496 -0
  59. package/dist/cdn/components/moni-toolbar.js +71 -0
  60. package/dist/cdn/components/moni-tooltip.js +161 -0
  61. package/dist/cdn/components/moni-typography.js +117 -0
  62. package/dist/cdn/importmap.json +102 -0
  63. package/dist/cdn/moni-ui.min.css +1 -0
  64. package/package.json +3 -1
@@ -0,0 +1,738 @@
1
+ var e=globalThis,t=e.ShadowRoot&&(e.ShadyCSS===void 0||e.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap,i=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,n=this.t;if(t&&e===void 0){let t=n!==void 0&&n.length===1;t&&(e=r.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&r.set(n,e))}return e}toString(){return this.cssText}},a=e=>new i(typeof e==`string`?e:e+``,void 0,n),o=(e,...t)=>new i(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,n),s=(n,r)=>{if(t)n.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let t of r){let r=document.createElement(`style`),i=e.litNonce;i!==void 0&&r.setAttribute(`nonce`,i),r.textContent=t.cssText,n.appendChild(r)}},c=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return a(t)})(e):e,{is:l,defineProperty:u,getOwnPropertyDescriptor:d,getOwnPropertyNames:ee,getOwnPropertySymbols:te,getPrototypeOf:ne}=Object,f=globalThis,p=f.trustedTypes,re=p?p.emptyScript:``,ie=f.reactiveElementPolyfillSupport,m=(e,t)=>e,h={toAttribute(e,t){switch(t){case Boolean:e=e?re:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},g=(e,t)=>!l(e,t),_={attribute:!0,type:String,converter:h,reflect:!1,useDefault:!1,hasChanged:g};Symbol.metadata??=Symbol(`metadata`),f.litPropertyMetadata??=new WeakMap;var v=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&u(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_}static _$Ei(){if(this.hasOwnProperty(m(`elementProperties`)))return;let e=ne(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(m(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m(`properties`))){let e=this.properties,t=[...ee(e),...te(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(c(e))}else e!==void 0&&t.push(c(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?h:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?h:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??g)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};v.elementStyles=[],v.shadowRootOptions={mode:`open`},v[m(`elementProperties`)]=new Map,v[m(`finalized`)]=new Map,ie?.({ReactiveElement:v}),(f.reactiveElementVersions??=[]).push(`2.1.2`);var y=globalThis,b=e=>e,x=y.trustedTypes,ae=x?x.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,S=`$lit$`,C=`lit$${Math.random().toFixed(9).slice(2)}$`,w=`?`+C,oe=`<${w}>`,T=document,E=()=>T.createComment(``),D=e=>e===null||typeof e!=`object`&&typeof e!=`function`,O=Array.isArray,k=e=>O(e)||typeof e?.[Symbol.iterator]==`function`,A=`[
2
+ \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,se=/-->/g,ce=/>/g,M=RegExp(`>|${A}(?:([^\\s"'>=/]+)(${A}*=${A}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),N=/'/g,P=/"/g,F=/^(?:script|style|textarea|title)$/i,I=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),le=I(1),ue=I(2),de=I(3),L=Symbol.for(`lit-noChange`),R=Symbol.for(`lit-nothing`),z=new WeakMap,B=T.createTreeWalker(T,129);function V(e,t){if(!O(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return ae===void 0?t:ae.createHTML(t)}var H=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=j;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===j?c[1]===`!--`?o=se:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=M):(F.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=M):o=ce:o===M?c[0]===`>`?(o=i??j,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?M:c[3]===`"`?P:N):o===P||o===N?o=M:o===se||o===ce?o=j:(o=M,i=void 0);let d=o===M&&e[t+1].startsWith(`/>`)?` `:``;a+=o===j?n+oe:l>=0?(r.push(s),n.slice(0,l)+S+n.slice(l)+C+d):n+C+(l===-2?t:d)}return[V(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},U=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=H(t,n);if(this.el=e.createElement(l,r),B.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=B.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(S)){let t=u[o++],n=i.getAttribute(e).split(C),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?J:r[1]===`?`?Y:r[1]===`@`?fe:q}),i.removeAttribute(e)}else e.startsWith(C)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(F.test(i.tagName)){let e=i.textContent.split(C),t=e.length-1;if(t>0){i.textContent=x?x.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],E()),B.nextNode(),c.push({type:2,index:++a});i.append(e[t],E())}}}else if(i.nodeType===8){if(i.data===w)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(C,e+1))!==-1;)c.push({type:7,index:a}),e+=C.length-1}}a++}}static createElement(e,t){let n=T.createElement(`template`);return n.innerHTML=e,n}};function W(e,t,n=e,r){if(t===L)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=D(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=W(e,i._$AS(e,t.values),i,r)),t}var G=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??T).importNode(t,!0);B.currentNode=r;let i=B.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new K(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new X(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=B.nextNode(),a++)}return B.currentNode=T,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},K=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=W(this,e,t),D(e)?e===R||e==null||e===``?(this._$AH!==R&&this._$AR(),this._$AH=R):e!==this._$AH&&e!==L&&this._(e):e._$litType$===void 0?e.nodeType===void 0?k(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==R&&D(this._$AH)?this._$AA.nextSibling.data=e:this.T(T.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=U.createElement(V(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new G(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=z.get(e.strings);return t===void 0&&z.set(e.strings,t=new U(e)),t}k(t){O(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(E()),this.O(E()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=b(e).nextSibling;b(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=R,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=R}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=W(this,e,t,0),a=!D(e)||e!==this._$AH&&e!==L,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=W(this,r[n+o],t,o),s===L&&(s=this._$AH[o]),a||=!D(s)||s!==this._$AH[o],s===R?e=R:e!==R&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},J=class extends q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===R?void 0:e}},Y=class extends q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==R)}},fe=class extends q{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=W(this,e,t,0)??R)===L)return;let n=this._$AH,r=e===R&&n!==R||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==R&&(n===R||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},X=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){W(this,e)}},pe={M:S,P:C,A:w,C:1,L:H,R:G,D:k,V:W,I:K,H:q,N:Y,U:fe,B:J,F:X},me=y.litHtmlPolyfillSupport;me?.(U,K),(y.litHtmlVersions??=[]).push(`3.3.3`);var he=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new K(t.insertBefore(E(),e),e,void 0,n??{})}return i._$AI(e),i},Z=globalThis,Q=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=he(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return L}};Q._$litElement$=!0,Q.finalized=!0,Z.litElementHydrateSupport?.({LitElement:Q});var ge=Z.litElementPolyfillSupport;ge?.({LitElement:Q}),(Z.litElementVersions??=[]).push(`4.2.2`);var _e=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},ve={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:g},ye=(e=ve,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function $(e){return(t,n)=>typeof n==`object`?ye(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function be(e){return $({...e,state:!0,attribute:!1})}var xe=class extends Q{constructor(...e){super(...e),this._isBaseInViewport=!1,this._handleGlobalSlotClick=e=>{let t=e.composedPath().find(e=>e instanceof HTMLSlotElement);if(t){let n=t.name||`default`;this.dispatchEvent(new CustomEvent(`slot-click`,{bubbles:!0,composed:!0,detail:{originalEvent:e,slotName:n,originalTarget:e.target}}))}}}createRenderRoot(){return super.createRenderRoot()}connectedCallback(){super.connectedCallback(),typeof IntersectionObserver<`u`&&(this._globalIntersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting!==this._isBaseInViewport&&(this._isBaseInViewport=e.isIntersecting,this.dispatchEvent(new CustomEvent(this._isBaseInViewport?`moni-enter-viewport`:`moni-leave-viewport`,{bubbles:!0,composed:!0,detail:{element:this}})))})},{threshold:[0,1]}),this._globalIntersectionObserver.observe(this)),typeof ResizeObserver<`u`&&(this._globalResizeObserver=new ResizeObserver(e=>{e.forEach(e=>{this.dispatchEvent(new CustomEvent(`moni-resize`,{bubbles:!0,composed:!0,detail:{contentRect:e.contentRect,element:this}}))})}),this._globalResizeObserver.observe(this)),this.addEventListener(`click`,this._handleGlobalSlotClick)}disconnectedCallback(){super.disconnectedCallback(),this._globalIntersectionObserver?.disconnect(),this._globalResizeObserver?.disconnect(),this.removeEventListener(`click`,this._handleGlobalSlotClick)}},Se=o`
3
+ /* ─── 1. Box-sizing reset ─────────────────────────────────────────────── */
4
+ :host {
5
+ box-sizing: border-box;
6
+ font-family: var(--font);
7
+ font-style: normal;
8
+ position: relative;
9
+ color: var(--on-surface);
10
+ }
11
+
12
+ *,
13
+ *::before,
14
+ *::after {
15
+ box-sizing: border-box;
16
+ font-style: normal;
17
+ }
18
+
19
+ ::slotted(*) {
20
+ font-style: normal;
21
+ }
22
+
23
+ /* ─── 2. CSS custom property bridge ──────────────────────────────────── */
24
+ /* Each token resolves in order: Moni namespace → MD3 spec → M3 default. */
25
+ :host {
26
+ /* ─── Primary palette ─── */
27
+ --primary: var(--moni-primary, var(--md-sys-color-primary, #6750A4));
28
+ --on-primary: var(--moni-on-primary, var(--md-sys-color-on-primary, #ffffff));
29
+ --primary-container: var(--moni-primary-container, var(--md-sys-color-primary-container, #eaddff));
30
+ --on-primary-container: var(--moni-on-primary-container, var(--md-sys-color-on-primary-container, #21005d));
31
+
32
+ /* ─── Secondary palette ─── */
33
+ --secondary: var(--moni-secondary, var(--md-sys-color-secondary, #625b71));
34
+ --on-secondary: var(--moni-on-secondary, var(--md-sys-color-on-secondary, #ffffff));
35
+ --secondary-container: var(--moni-secondary-container, var(--md-sys-color-secondary-container, #e8def8));
36
+ --on-secondary-container: var(--moni-on-secondary-container, var(--md-sys-color-on-secondary-container, #1d192b));
37
+
38
+ /* ─── Tertiary palette ─── */
39
+ --tertiary: var(--moni-tertiary, var(--md-sys-color-tertiary, #7d5260));
40
+ --on-tertiary: var(--moni-on-tertiary, var(--md-sys-color-on-tertiary, #ffffff));
41
+ --tertiary-container: var(--moni-tertiary-container, var(--md-sys-color-tertiary-container, #ffd8e4));
42
+ --on-tertiary-container: var(--moni-on-tertiary-container, var(--md-sys-color-on-tertiary-container, #31111d));
43
+
44
+ /* ─── Error palette ─── */
45
+ --error: var(--moni-error, var(--md-sys-color-error, #b3261e));
46
+ --on-error: var(--moni-on-error, var(--md-sys-color-on-error, #ffffff));
47
+ --error-container: var(--moni-error-container, var(--md-sys-color-error-container, #f9dedc));
48
+ --on-error-container: var(--moni-on-error-container, var(--md-sys-color-on-error-container, #410e0b));
49
+
50
+ /* ─── Background & surface ─── */
51
+ --background: var(--moni-background, var(--md-sys-color-background, #fef7ff));
52
+ --on-background: var(--moni-on-background, var(--md-sys-color-on-background, #1d1b20));
53
+ --surface: var(--moni-surface, var(--md-sys-color-surface, #fef7ff));
54
+ --on-surface: var(--moni-on-surface, var(--md-sys-color-on-surface, #1d1b20));
55
+ --surface-variant: var(--moni-surface-variant, var(--md-sys-color-surface-variant, #e7e0ec));
56
+ --on-surface-variant: var(--moni-on-surface-variant, var(--md-sys-color-on-surface-variant, #49454f));
57
+
58
+ /* ─── Outline ─── */
59
+ --outline: var(--moni-outline, var(--md-sys-color-outline, #79747e));
60
+ --outline-variant: var(--moni-outline-variant, var(--md-sys-color-outline-variant, #cac4d0));
61
+
62
+ /* ─── Surface container hierarchy (5-level elevation tones) ─── */
63
+ --surface-container-lowest: var(--moni-surface-container-lowest, var(--md-sys-color-surface-container-lowest, #ffffff));
64
+ --surface-container-low: var(--moni-surface-container-low, var(--md-sys-color-surface-container-low, #f7f2fa));
65
+ --surface-container: var(--moni-surface-container, var(--md-sys-color-surface-container, #f3edf7));
66
+ --surface-container-high: var(--moni-surface-container-high, var(--md-sys-color-surface-container-high, #ece6f0));
67
+ --surface-container-highest: var(--moni-surface-container-highest, var(--md-sys-color-surface-container-highest, #e6e1e5));
68
+
69
+ /* ─── Inverse surfaces (snackbar, tooltip) ─── */
70
+ --inverse-surface: var(--moni-inverse-surface, var(--md-sys-color-inverse-surface, #313033));
71
+ --inverse-on-surface: var(--moni-inverse-on-surface, var(--md-sys-color-inverse-on-surface, #f4f0f4));
72
+ --inverse-primary: var(--moni-inverse-primary, var(--md-sys-color-inverse-primary, #d0bcff));
73
+
74
+ /* ─── Structural / non-color tokens ─── */
75
+ /* Scrim overlay used in modals, bottom sheets, dialogs. */
76
+ --shadow: 0 0 0 0 transparent;
77
+ --scrim: rgb(0 0 0 / 0.5);
78
+ /* State layer color for hover/pressed overlays. */
79
+ --active: color-mix(in srgb, currentColor 10%, transparent);
80
+ --overlay: rgb(0 0 0 / 0.5);
81
+ --image: linear-gradient(currentColor 0 0);
82
+
83
+ /* ─── Typography tokens ─── */
84
+ --font: var(--moni-font-sans, 'Geist', system-ui, -apple-system, sans-serif);
85
+ --font-title: var(
86
+ --moni-font-title,
87
+ 'Instrument Serif',
88
+ Georgia,
89
+ serif
90
+ );
91
+ --font-mono: 'Geist Mono', 'Fira Code', monospace;
92
+ /* Icon font: override via --font-icon-override to use a different icon set. */
93
+ --font-icon: var(--font-icon-override, 'Material Symbols Rounded');
94
+
95
+ /* ─── Elevation shadows (MD3 tonal levels 1–3) ─── */
96
+ --elevate1: 0 0.125rem 0.125rem 0 rgb(0 0 0 / 0.32);
97
+ --elevate2: 0 0.25rem 0.5rem 0 rgb(0 0 0 / 0.4);
98
+ --elevate3: 0 0.375rem 0.75rem 0 rgb(0 0 0 / 0.48);
99
+
100
+ /* ─── Transition speed scale ─── */
101
+ /* speed1 = fastest micro-interactions; speed4 = slowest page transitions. */
102
+ --speed1: 100ms;
103
+ --speed2: 200ms;
104
+ --speed3: 300ms;
105
+ --speed4: 400ms;
106
+ }
107
+
108
+ /* ─── 3. MD3 --color-* backward-compatibility aliases ─────────────── */
109
+ /* These map the older --color-<role> naming convention used in legacy */
110
+ /* Moni apps to the primary bare tokens above. Do not remove. */
111
+ :host {
112
+ --color-primary: var(--primary);
113
+ --color-on-primary: var(--on-primary);
114
+ --color-primary-container: var(--primary-container);
115
+ --color-on-primary-container: var(--on-primary-container);
116
+
117
+ --color-secondary: var(--secondary);
118
+ --color-on-secondary: var(--on-secondary);
119
+ --color-secondary-container: var(--secondary-container);
120
+ --color-on-secondary-container: var(--on-secondary-container);
121
+
122
+ --color-tertiary: var(--tertiary);
123
+ --color-on-tertiary: var(--on-tertiary);
124
+ --color-tertiary-container: var(--tertiary-container);
125
+ --color-on-tertiary-container: var(--on-tertiary-container);
126
+
127
+ --color-error: var(--error);
128
+ --color-on-error: var(--on-error);
129
+ --color-error-container: var(--error-container);
130
+ --color-on-error-container: var(--on-error-container);
131
+
132
+ --color-background: var(--background);
133
+ --color-on-background: var(--on-background);
134
+ --color-surface: var(--surface);
135
+ --color-on-surface: var(--on-surface);
136
+ --color-surface-variant: var(--surface-variant);
137
+ --color-on-surface-variant: var(--on-surface-variant);
138
+
139
+ --color-outline: var(--outline);
140
+ --color-outline-variant: var(--outline-variant);
141
+
142
+ --color-surface-container-lowest: var(--surface-container-lowest);
143
+ --color-surface-container-low: var(--surface-container-low);
144
+ --color-surface-container: var(--surface-container);
145
+ --color-surface-container-high: var(--surface-container-high);
146
+ --color-surface-container-highest: var(--surface-container-highest);
147
+
148
+ --color-inverse-surface: var(--inverse-surface);
149
+ --color-inverse-on-surface: var(--inverse-on-surface);
150
+ --color-inverse-primary: var(--inverse-primary);
151
+
152
+ /* Named aliases for tokens defined in the legacy tokens.css stylesheet. */
153
+ --font-sans: var(--font);
154
+ --shadow-1: var(--elevate1);
155
+ --shadow-2: var(--elevate2);
156
+ --shadow-3: var(--elevate3);
157
+ --radius-sm: 0.5rem;
158
+ --radius-md: 0.75rem;
159
+ --radius-lg: 1.5rem;
160
+ --ease-standard: cubic-bezier(0.2, 0, 0, 1);
161
+ --ease-emphasized: cubic-bezier(0.3, 0, 0, 1);
162
+ --duration-fast: 150ms;
163
+ --duration-normal: 250ms;
164
+ }
165
+
166
+ /* ─── 4. Utility classes ─────────────────────────────────────────────── */
167
+
168
+ /**
169
+ * Clamps text to a single line with an ellipsis when overflow occurs.
170
+ * Apply to any element inside a shadow root where text needs to be truncated.
171
+ */
172
+ .truncate {
173
+ overflow: hidden;
174
+ white-space: nowrap;
175
+ text-overflow: ellipsis;
176
+ }
177
+
178
+ /**
179
+ * Visually hides an element while keeping it accessible to screen readers
180
+ * and maintaining its position in the DOM and tab order.
181
+ * Use for labeling icon-only buttons, skip links, etc.
182
+ */
183
+ .visually-hidden {
184
+ position: absolute;
185
+ width: 1px;
186
+ height: 1px;
187
+ padding: 0;
188
+ margin: -1px;
189
+ overflow: hidden;
190
+ clip: rect(0, 0, 0, 0);
191
+ white-space: nowrap;
192
+ border: 0;
193
+ }
194
+ `,Ce=o`
195
+ :host {
196
+ display: block;
197
+ /* Fields are full-width by default; the parent layout controls sizing. */
198
+ inline-size: 100%;
199
+ }
200
+
201
+ /* ─── Base field container ───────────────────────────────────────────────── */
202
+ .field {
203
+ /* Internal height token — overridden by size modifiers (.small, .large, .extra). */
204
+ --_input: 3rem;
205
+ /* Vertical start offset used for textarea padding and label positioning. */
206
+ --_start: 1.2rem;
207
+ /* Computed vertical center — used to position absolutely-placed icons. */
208
+ --_middle: calc(var(--_input, 0) / 2);
209
+
210
+ /* Default field shape: bottom border only (BeerCSS / MD3 "filled" style). */
211
+ border-radius: 0.25rem 0.25rem 0 0;
212
+ min-block-size: var(--_input);
213
+ display: flex;
214
+ flex-direction: column;
215
+ position: relative;
216
+ inline-size: 100%;
217
+ }
218
+
219
+ /* ─── Shape overrides ────────────────────────────────────────────────────── */
220
+
221
+ /* Square: removes all border-radius regardless of other modifiers.
222
+ Uses !important to win specificity over .border and [class*='round']. */
223
+ .field.square,
224
+ .field.square.border,
225
+ .field.square[class*='round'] {
226
+ border-radius: 0 !important;
227
+ }
228
+ .field.square > :is(input, textarea, select) {
229
+ border-radius: 0 !important;
230
+ }
231
+
232
+ /* ─── Fill variant ───────────────────────────────────────────────────────── */
233
+ /* Unsets background/color on the container; the background is applied
234
+ directly to the <input> so that the floating label overlaps it correctly. */
235
+ .field.fill {
236
+ --_background: var(--surface-container-highest);
237
+ background-color: unset !important;
238
+ color: unset !important;
239
+ }
240
+ .field.fill > :is(input, select, textarea) {
241
+ background-color: var(--_background);
242
+ /* z-index: 0 ensures the background renders above the ::before layer. */
243
+ z-index: 0;
244
+ }
245
+
246
+ /* ─── Size variants ──────────────────────────────────────────────────────── */
247
+ .field.small {
248
+ --_input: 2.5rem;
249
+ --_start: 1rem;
250
+ }
251
+ .field.large {
252
+ --_input: 3.5rem;
253
+ --_start: 1.4rem;
254
+ }
255
+ .field.extra {
256
+ --_input: 4rem;
257
+ --_start: 1.6rem;
258
+ }
259
+
260
+ /* ─── Border (outlined) variant ─────────────────────────────────────────── */
261
+ /* Adds full border-radius and outline-variant stroke on all four sides. */
262
+ .field.border {
263
+ border-radius: 0.25rem;
264
+ }
265
+
266
+ /* ─── Round / pill variants ──────────────────────────────────────────────── */
267
+ /* Applied when class matches the 'round' substring (e.g. .round, .round-sm). */
268
+ .field[class*='round'].small {
269
+ border-radius: 1.25rem;
270
+ }
271
+ .field[class*='round'] {
272
+ border-radius: 1.5rem;
273
+ }
274
+ .field[class*='round'].large {
275
+ border-radius: 1.75rem;
276
+ }
277
+ .field[class*='round'].extra {
278
+ border-radius: 2rem;
279
+ }
280
+
281
+ /* ─── Icon positioning ───────────────────────────────────────────────────── */
282
+ /* Generic rule: absolutely positions any icon/image/svg inside the field. */
283
+ .field > :is(i, img, svg) {
284
+ position: absolute;
285
+ inset: calc((var(--_input, 0) / 2) - 0.75rem) auto auto auto;
286
+ cursor: pointer;
287
+ z-index: 10;
288
+ inline-size: 1.5rem;
289
+ block-size: 1.5rem;
290
+ margin: auto 0;
291
+ pointer-events: none;
292
+ }
293
+ /* Leading icon: explicit class wins over :first-child heuristic. */
294
+ .field > :is(i, img, svg):first-child,
295
+ .field > .leading-icon {
296
+ inset: calc(var(--_middle, 0) - 0.75rem) auto auto 1rem;
297
+ }
298
+
299
+ /* Trailing icon: BeerCSS uses :last-child:not(:first-child) which fails when
300
+ an <output> follows the icon. The explicit class always wins and places
301
+ the icon on the right edge regardless of sibling count. */
302
+ .field > :is(i, img, svg):last-child:not(:first-child),
303
+ .field > .trailing-icon {
304
+ inset: calc(var(--_middle, 0) - 0.75rem) 1rem auto auto;
305
+ /* Prevent the inline-start override from the generic rule above. */
306
+ inset-inline-start: auto !important;
307
+ }
308
+
309
+ /* Error state: trailing icons inherit the error color. */
310
+ .field.invalid > i {
311
+ color: var(--error);
312
+ }
313
+
314
+ /* ─── Native form element reset ──────────────────────────────────────────── */
315
+ /* 'all: unset' strips browser-default styles (appearance, border, font, etc.)
316
+ so the field's visual design is fully controlled by Moni's CSS. */
317
+ .field > :is(input, textarea, select) {
318
+ all: unset;
319
+ position: relative;
320
+ display: block;
321
+ box-sizing: border-box;
322
+ border-radius: inherit;
323
+ /* Default border is transparent; visible only in .border and focus states. */
324
+ border: 0.0625rem solid transparent;
325
+ padding: 0 0.9375rem;
326
+ font-family: inherit;
327
+ font-size: 1rem;
328
+ min-block-size: var(--_input);
329
+ outline: none;
330
+ z-index: 1;
331
+ background: none;
332
+ resize: none; /* Textareas use field-sizing:content instead of manual resize. */
333
+ text-align: start;
334
+ cursor: text;
335
+ color: var(--on-surface);
336
+ }
337
+
338
+ /* Ensure date/time input values align to start (browser quirk on some platforms). */
339
+ input::-webkit-date-and-time-value {
340
+ text-align: start;
341
+ }
342
+
343
+ /* Autofill: preserve text color when the browser applies its autofill highlight.
344
+ -webkit-background-clip + -webkit-text-fill-color override the yellow tint. */
345
+ :is(input, select, textarea):is(:-webkit-autofill, :autofill) {
346
+ -webkit-background-clip: text;
347
+ -webkit-text-fill-color: var(--on-surface);
348
+ }
349
+
350
+ /* On focus, increase border width by 1px — shift padding inward by 1px
351
+ to prevent layout shift from the border width change. */
352
+ .field > :is(input, textarea, select):focus {
353
+ border: 0.125rem solid transparent;
354
+ padding-inline: 0.875rem;
355
+ }
356
+
357
+ /* Textareas without explicit rows grow automatically using field-sizing:content.
358
+ A max-height of 12rem (~8 lines) prevents uncontrolled page growth. */
359
+ .field > textarea:not([rows]) {
360
+ field-sizing: content;
361
+ max-block-size: 12rem;
362
+ }
363
+
364
+ /* ─── Transparent native picker controls ─────────────────────────────────── */
365
+ /* File and color inputs, and date/time picker indicators are hidden so the
366
+ component can render its own UI. The native controls are still active for
367
+ accessibility (click propagates through the transparent overlay). */
368
+ input[type='file'],
369
+ input[type='color'],
370
+ :not(.field) > input:is([type^='date'], [type^='time'], [type='month'], [type='week']),
371
+ input::-webkit-calendar-picker-indicator {
372
+ opacity: 0;
373
+ position: absolute;
374
+ inset: 0;
375
+ inline-size: 100%;
376
+ block-size: 100%;
377
+ margin: 0;
378
+ padding: 0;
379
+ border: 0;
380
+ outline: 0;
381
+ z-index: 2 !important;
382
+ }
383
+
384
+ /* On fine-pointer (mouse) devices, push the calendar picker indicator behind
385
+ the field content so it doesn't interfere with other clickable elements. */
386
+ @media (pointer: fine) {
387
+ .field > input::-webkit-calendar-picker-indicator {
388
+ z-index: -1 !important;
389
+ }
390
+ }
391
+
392
+ /* Remove browser-native search field decorations. */
393
+ input::-webkit-search-decoration,
394
+ input::-webkit-search-cancel-button,
395
+ input::-webkit-search-results-button,
396
+ input::-webkit-search-results-decoration,
397
+ input::-webkit-inner-spin-button,
398
+ input::-webkit-outer-spin-button {
399
+ display: none;
400
+ }
401
+
402
+ /* Remove the browser spinner on number inputs — use explicit stepper UI instead. */
403
+ input[type='number'] {
404
+ appearance: textfield;
405
+ }
406
+
407
+ /* ─── Border variant: field-level border colors ──────────────────────────── */
408
+ .field.border > :is(input, textarea, select) {
409
+ border-color: var(--outline);
410
+ }
411
+ .field.border > :is(input, textarea, select):focus {
412
+ border-color: var(--primary);
413
+ }
414
+
415
+ /* Round variants add extra inline padding to clear the curved edges. */
416
+ .field[class*='round'] > :is(input, textarea, select) {
417
+ padding-inline: 1.4376rem;
418
+ }
419
+ .field[class*='round'] > :is(input, textarea, select):focus {
420
+ padding-inline: 1.375rem;
421
+ }
422
+
423
+ /* ─── Icon padding accommodation ─────────────────────────────────────────── */
424
+ /* .prefix / .suffix shift the input's inline padding to make room for icons. */
425
+ .field.prefix > :is(input, textarea, select) {
426
+ padding-inline-start: 2.9375rem;
427
+ }
428
+ .field.prefix > :is(input, textarea, select):focus {
429
+ padding-inline-start: 2.875rem;
430
+ }
431
+ .field.suffix > :is(input, textarea, select) {
432
+ padding-inline-end: 2.9375rem;
433
+ }
434
+ .field.suffix > :is(input, textarea, select):focus {
435
+ padding-inline-end: 2.875rem;
436
+ }
437
+
438
+ /* ─── Underline (non-border, non-round) bottom border ─────────────────────── */
439
+ /* Default M3 filled field style: only the bottom border is visible. */
440
+ .field:not(.border, [class*='round']) > :is(input, textarea, select) {
441
+ border-block-end-color: var(--outline);
442
+ }
443
+ .field:not(.border, [class*='round']) > :is(input, textarea, select):focus {
444
+ border-block-end-color: var(--primary);
445
+ }
446
+
447
+ /* Round non-bordered fields get a subtle elevation shadow instead of a border. */
448
+ .field[class*='round']:not(.border, .fill) > :is(input, textarea, select),
449
+ .field[class*='round']:not(.border) > :is(input, textarea, select):focus {
450
+ box-shadow: var(--elevate1);
451
+ }
452
+ .field[class*='round']:not(.border, .fill) > :is(input, textarea, select):focus {
453
+ box-shadow: var(--elevate2);
454
+ }
455
+
456
+ /* ─── Invalid / error state borders ─────────────────────────────────────── */
457
+ .field.invalid:not(.border, [class*='round']) > :is(input, textarea, select),
458
+ .field.invalid:not(.border, [class*='round']) > :is(input, textarea, select):focus {
459
+ border-block-end-color: var(--error);
460
+ }
461
+ .field.invalid.border > :is(input, textarea, select),
462
+ .field.invalid.border > :is(input, textarea, select):focus {
463
+ border-color: var(--error);
464
+ }
465
+
466
+ /* ─── Disabled state ─────────────────────────────────────────────────────── */
467
+ /* Reduces opacity on the entire field container when the native control is
468
+ disabled, rather than applying separate rules to each child. */
469
+ .field:has(> :disabled) {
470
+ opacity: 0.5;
471
+ cursor: not-allowed;
472
+ }
473
+ .field > :disabled {
474
+ cursor: not-allowed;
475
+ }
476
+
477
+ /* ─── Select element ─────────────────────────────────────────────────────── */
478
+ /* Remove browser-native select appearance; the component renders its own dropdown. */
479
+ .field > select {
480
+ user-select: none;
481
+ appearance: none;
482
+ -webkit-appearance: none;
483
+ background-image: none;
484
+ }
485
+
486
+ /* ─── Block-start padding for label accommodation ────────────────────────── */
487
+ /* Inputs with a floating label need top padding to create space for the
488
+ label when it lifts above the input. Selects always lift their label. */
489
+ .field > :is(input, select) {
490
+ padding-block-start: 1rem;
491
+ }
492
+ /* No-label and border+fill fields: remove the top padding offset. */
493
+ .field:not(.label) > :is(input, select),
494
+ .field.border:not(.fill) > :is(input, select) {
495
+ padding-block-start: 0;
496
+ }
497
+ /* Textareas use the --_start token to align with the label baseline. */
498
+ .field > textarea {
499
+ padding-block-start: var(--_start) !important;
500
+ }
501
+ .field > textarea:focus {
502
+ /* 0.01rem compensates for the border width increase on focus. */
503
+ padding-block-start: calc(var(--_start, 0) - 0.01rem) !important;
504
+ }
505
+ .field:not(.label) > textarea,
506
+ .field.border:not(.fill) > textarea {
507
+ padding-block-start: calc(var(--_start, 0) - 0.5rem) !important;
508
+ }
509
+ .field:not(.label) > textarea:focus,
510
+ .field.border:not(.fill) > textarea:focus {
511
+ padding-block-start: calc(var(--_start, 0) - 0.51rem) !important;
512
+ }
513
+
514
+ /* ─── Floating label ─────────────────────────────────────────────────────── */
515
+ /* The label starts at full font-size (1rem) vertically centered in the field.
516
+ On focus or when value is present, it scales down to 0.75rem and lifts
517
+ to the top of the field container. */
518
+ .field.label > label {
519
+ --_start: 1rem;
520
+ position: absolute;
521
+ inset: -0.5rem 0.9375rem 0 var(--_start);
522
+ display: flex;
523
+ /* Full height + 1rem (for label overhang) centers the label vertically. */
524
+ block-size: calc(var(--_input, 0) + 1rem);
525
+ line-height: calc(var(--_input, 0) + 1rem);
526
+ font-size: 1rem;
527
+ transition: all 0.2s;
528
+ gap: 0.25rem;
529
+ white-space: nowrap;
530
+ /* The label is purely decorative from a layout perspective; it must never
531
+ intercept pointer events meant for the underlying input. */
532
+ pointer-events: none;
533
+ color: var(--on-surface-variant);
534
+ }
535
+
536
+ /* Round fields: label aligns with the increased inline padding. */
537
+ .field.label[class*='round'] > label {
538
+ inset: -0.5rem 1.9375rem 0 var(--_start);
539
+ }
540
+
541
+ /* ─── Label lift selector group ──────────────────────────────────────────── */
542
+ /* The label lifts (scales down + moves up) in four conditions:
543
+ 1. label.active — the component sets this class directly (readonly inputs).
544
+ 2. :focus + label — when the native control is focused.
545
+ 3. [placeholder]:not(:placeholder-shown) + label — when a value is present.
546
+ 4. select + label — selects always show their label lifted.
547
+ 5. input.active + label — for programmatically activated inputs. */
548
+
549
+ /* Border + prefix + no-fill variant needs a reduced --_start offset. */
550
+ .field.label.border.prefix:not(.fill)
551
+ > :is(
552
+ label.active,
553
+ :focus + label,
554
+ [placeholder]:not(:placeholder-shown) + label,
555
+ select + label,
556
+ input.active + label
557
+ ) {
558
+ --_start: 1rem;
559
+ }
560
+
561
+ /* Round field label and round border prefix field label override. */
562
+ .field.label[class*='round'] > label,
563
+ .field.label.border.prefix[class*='round']:not(.fill)
564
+ > :is(
565
+ label.active,
566
+ :focus + label,
567
+ [placeholder]:not(:placeholder-shown) + label,
568
+ select + label,
569
+ input.active + label
570
+ ) {
571
+ --_start: 1.5rem;
572
+ }
573
+
574
+ /* Prefix fields: shift the label's inline-start to clear the leading icon. */
575
+ .field.label.prefix > label {
576
+ --_start: 3rem;
577
+ }
578
+
579
+ /* Lifted label: shrinks to 0.75rem and collapses to the top of the field. */
580
+ .field.label
581
+ > :is(
582
+ label.active,
583
+ :focus + label,
584
+ [placeholder]:not(:placeholder-shown) + label,
585
+ select + label,
586
+ input.active + label
587
+ ) {
588
+ block-size: 2.5rem;
589
+ line-height: 2.5rem;
590
+ font-size: 0.75rem;
591
+ }
592
+
593
+ /* Border variant: label collapses to 1rem height with a notch cut effect. */
594
+ .field.label.border:not(.fill)
595
+ > :is(
596
+ label.active,
597
+ :focus + label,
598
+ [placeholder]:not(:placeholder-shown) + label,
599
+ select + label,
600
+ input.active + label
601
+ ) {
602
+ block-size: 1rem;
603
+ line-height: 1rem;
604
+ }
605
+
606
+ /* ─── Border notch (label gap in the top border) ─────────────────────────── */
607
+ /* The ::after pseudo creates the horizontal line to the right of the lifted
608
+ label, visually cutting a notch into the top border of .field.border. */
609
+ .field.label.border:not(.fill) > label::after {
610
+ content: '';
611
+ display: block;
612
+ margin: 0.5rem 0 0 0;
613
+ border-block-start: 0.0625rem solid var(--outline);
614
+ block-size: 1rem;
615
+ transition: none;
616
+ flex: auto;
617
+ }
618
+ .field.label.border:not(.fill) > :focus + label::after {
619
+ /* On focus, the notch line becomes primary-colored. */
620
+ border-block-start: 0.125rem solid var(--primary);
621
+ }
622
+
623
+ /* ─── Border notch clipping (clip-path) ──────────────────────────────────── */
624
+ /* When the label is lifted, a clip-path cuts a gap in the top border of the
625
+ input element itself, creating the appearance of the label floating within
626
+ the border's top edge. The clip-path dimensions account for label width. */
627
+ .field.label.border.square:not(.fill)
628
+ > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
629
+ .field.label.border.square:not(.fill) > select,
630
+ .field.label.border.square:not(.fill) > input.active,
631
+ .field.label.border.square:not(.fill) > select.active {
632
+ clip-path: polygon(-2% -2%,.75rem -2%,.75rem .5rem,calc(100% - 1rem) .5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%);
633
+ }
634
+
635
+ /* Prefix variant: clip starts further right to clear the leading icon text. */
636
+ .field.label.border.prefix.square:not(.fill)
637
+ > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
638
+ .field.label.border.prefix.square:not(.fill) > select,
639
+ .field.label.border.prefix.square:not(.fill) > input.active,
640
+ .field.label.border.prefix.square:not(.fill) > select.active {
641
+ clip-path: polygon(-2% -2%,.75rem -2%,.75rem .5rem,calc(100% - 1rem) .5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%);
642
+ }
643
+
644
+ /* Round and square border fields use a wider notch to clear the curved border. */
645
+ .field.label.border[class*='round']:not(.fill)
646
+ > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
647
+ .field.label.border[class*='round']:not(.fill) > select,
648
+ .field.label.border:not(.fill)
649
+ > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
650
+ .field.label.border:not(.fill) > select {
651
+ clip-path: polygon(-2% -2%,1.25rem -2%,1.25rem .5rem,calc(100% - 2rem) .5rem,calc(100% - 2rem) -2%,102% -2%,102% 102%,-2% 102%);
652
+ }
653
+
654
+ .field.label.border.prefix[class*='round']:not(.fill)
655
+ > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
656
+ .field.label.border.prefix[class*='round']:not(.fill) > select,
657
+ .field.label.border.prefix:not(.fill)
658
+ > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
659
+ .field.label.border.prefix:not(.fill) > select {
660
+ clip-path: polygon(-2% -2%,1.25rem -2%,1.25rem .5rem,calc(100% - 2rem) .5rem,calc(100% - 2rem) -2%,102% -2%,102% 102%,-2% 102%);
661
+ }
662
+
663
+ /* ─── Label color changes ─────────────────────────────────────────────────── */
664
+ /* On focus: label turns primary-colored to draw attention. */
665
+ .field.label > :focus + label {
666
+ color: var(--primary);
667
+ }
668
+
669
+ /* On error: label and notch line turn error-colored. */
670
+ .field.label.invalid > label,
671
+ .field.label.invalid > label::after {
672
+ color: var(--error) !important;
673
+ border-color: var(--error) !important;
674
+ }
675
+
676
+ /* ─── Helper / error output ──────────────────────────────────────────────── */
677
+ /* The <output> element below the field shows helper text or validation errors. */
678
+ .field > output {
679
+ display: inline-block;
680
+ font-size: 0.75rem;
681
+ background: none !important;
682
+ padding: 0.25rem 1rem;
683
+ line-height: 1.25rem;
684
+ align-self: start;
685
+ color: var(--on-surface-variant);
686
+ }
687
+ /* Error output overrides the neutral helper color. */
688
+ .field > output.invalid {
689
+ color: var(--error) !important;
690
+ }
691
+ /* Round fields: increase horizontal padding to align with the curved edge. */
692
+ .field[class*='round'] > output {
693
+ padding: 0.25rem 1.5rem;
694
+ }
695
+ /* Show only one output at a time: helper OR error, never both. */
696
+ .field.invalid > output:not(.invalid),
697
+ .field:not(.invalid) > output.invalid {
698
+ display: none;
699
+ }
700
+
701
+ /* ─── Footer wrapper (textarea & multi-line fields) ───────────────────────── */
702
+ /* Lays out helper text (left) and character counter (right) on the same row,
703
+ matching the M3 spec for supporting-text + character-counter pairs. */
704
+ .field > .footer {
705
+ display: flex;
706
+ align-items: center;
707
+ justify-content: space-between;
708
+ gap: 1rem;
709
+ padding: 0;
710
+ min-block-size: 1.25rem;
711
+ }
712
+ .field > .footer > output {
713
+ display: inline-block;
714
+ font-size: 0.75rem;
715
+ background: none !important;
716
+ padding: 0.25rem 1rem;
717
+ line-height: 1.25rem;
718
+ align-self: center;
719
+ color: var(--on-surface-variant);
720
+ }
721
+ .field > .footer > output.invalid {
722
+ color: var(--error) !important;
723
+ }
724
+ /* Character counter — right-aligned, same typographic style as the helper. */
725
+ .field > .footer > .counter {
726
+ padding: 0.25rem 1rem;
727
+ color: var(--on-surface-variant);
728
+ }
729
+ /* Spacer pushes counter to the right when there is no helper text. */
730
+ .field > .footer > .spacer {
731
+ flex: 1;
732
+ }
733
+ /* Same exclusive show logic as direct <output> elements. */
734
+ .field.invalid > .footer > output:not(.invalid),
735
+ .field:not(.invalid) > .footer > output.invalid {
736
+ display: none;
737
+ }
738
+ `;function we(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}export{be as a,R as c,le as d,pe as f,a as h,xe as i,L as l,o as m,Ce as n,$ as o,ue as p,Se as r,_e as s,we as t,de as u};