@ahriknow/lux 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +127 -0
  3. package/README_zh-CN.md +127 -0
  4. package/dist/components/lux-button/index.iife.min.js +292 -0
  5. package/dist/components/lux-button/index.min.js +292 -0
  6. package/dist/components/lux-code/index.iife.min.js +290 -0
  7. package/dist/components/lux-code/index.min.js +290 -0
  8. package/dist/components/lux-dropdown/index.iife.min.js +162 -0
  9. package/dist/components/lux-dropdown/index.min.js +162 -0
  10. package/dist/components/lux-example/index.iife.min.js +88 -0
  11. package/dist/components/lux-example/index.min.js +88 -0
  12. package/dist/components/lux-icon/index.iife.min.js +22 -0
  13. package/dist/components/lux-icon/index.min.js +22 -0
  14. package/dist/components/lux-input/index.iife.min.js +238 -0
  15. package/dist/components/lux-input/index.min.js +238 -0
  16. package/dist/components/lux-layout/index.iife.min.js +90 -0
  17. package/dist/components/lux-layout/index.min.js +90 -0
  18. package/dist/components/lux-menu/index.iife.min.js +193 -0
  19. package/dist/components/lux-menu/index.min.js +193 -0
  20. package/dist/components/lux-scroll/index.iife.min.js +137 -0
  21. package/dist/components/lux-scroll/index.min.js +137 -0
  22. package/dist/components/lux-switch/index.iife.min.js +116 -0
  23. package/dist/components/lux-switch/index.min.js +116 -0
  24. package/dist/components/lux-table/index.iife.min.js +67 -0
  25. package/dist/components/lux-table/index.min.js +67 -0
  26. package/dist/lux.core.min.js +1 -0
  27. package/dist/lux.i18n.min.js +1 -0
  28. package/dist/lux.iife.js +1822 -0
  29. package/dist/lux.iife.js.map +1 -0
  30. package/dist/lux.iife.min.js +1 -0
  31. package/dist/lux.js +1792 -0
  32. package/dist/lux.js.map +1 -0
  33. package/dist/lux.min.js +1 -0
  34. package/dist/lux.router.min.js +1 -0
  35. package/dist/lux.template.min.js +1 -0
  36. package/dist/lux.theme.min.js +1 -0
  37. package/dist/themes/dark.css +130 -0
  38. package/dist/themes/light.css +128 -0
  39. package/package.json +64 -0
  40. package/src/components/lux-button/index.js +319 -0
  41. package/src/components/lux-code/index.js +382 -0
  42. package/src/components/lux-dropdown/index.js +256 -0
  43. package/src/components/lux-example/index.js +117 -0
  44. package/src/components/lux-icon/index.js +180 -0
  45. package/src/components/lux-input/index.js +363 -0
  46. package/src/components/lux-layout/index.js +222 -0
  47. package/src/components/lux-menu/index.js +283 -0
  48. package/src/components/lux-scroll/index.js +349 -0
  49. package/src/components/lux-switch/index.js +203 -0
  50. package/src/components/lux-table/index.js +105 -0
  51. package/src/core.js +7 -0
  52. package/src/element.js +477 -0
  53. package/src/i18n/format.js +108 -0
  54. package/src/i18n/index.js +102 -0
  55. package/src/i18n/locale.js +26 -0
  56. package/src/index.js +22 -0
  57. package/src/router.js +330 -0
  58. package/src/template.js +402 -0
  59. package/src/theme/color.js +148 -0
  60. package/src/theme/create.js +97 -0
  61. package/src/theme/index.js +2 -0
  62. package/src/theme/tokens.js +128 -0
  63. package/src/themes/dark.css +130 -0
  64. package/src/themes/light.css +128 -0
@@ -0,0 +1,88 @@
1
+ var LuxExample=function(){"use strict";const t=Symbol.for("lux-nothing");function e(t,...e){return{_$luxType$:1,strings:t,values:e}}function r(t){return t&&void 0!==t._$luxType$}const n=/(?:([@.?][\w-]+)|(ref)|(class))=\s*$/;function s(e,n,s){if(n!==t&&null!=n)if(function(t){return t&&"repeat"===t._type}(n))!function(t,e){const{items:n,keyFn:s,renderFn:o}=e,i=t._repeatState;if(i)for(const t of i.entries)t.span&&t.span.parentNode&&t.span.parentNode.removeChild(t.span);const c=document.createDocumentFragment(),l=[];for(const t of n){const e=s(t),n=o(t),i=document.createElement("span");i.style.display="contents",r(n)?a(n,i):null!=n&&!1!==n&&i.appendChild(document.createTextNode(String(n))),c.appendChild(i),l.push({key:e,result:n,span:i})}t.appendChild(c),t._repeatState={entries:l}}(e,n);else if(r(n))a(n,e);else if(Array.isArray(n)){o(e);for(const t of n)if(r(t)){const r=document.createElement("span");r.style.display="contents",a(t,r),e.appendChild(r)}else t instanceof Node?e.appendChild(t):null!=t&&!1!==t&&e.appendChild(document.createTextNode(String(t)))}else{if(n instanceof Node)return o(e),void e.appendChild(n);1===e.childNodes.length&&e.firstChild.nodeType===Node.TEXT_NODE?e.firstChild.textContent=String(n):(o(e),e.appendChild(document.createTextNode(String(n))))}else o(e)}function o(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function i(e,r){const{element:n,name:s,prefix:o}=e;switch(o){case"@":{const o=e.committedValue,i=null==r||r===t,a=i&&null!=o||r?.capture!==o?.capture||r?.once!==o?.once||r?.passive!==o?.passive,c=!i&&(null==o||a);if(a&&n.removeEventListener(s,e._handler||o,o),c)if("function"==typeof r){const t=e._host||(e._host={handleEvent(t){const r=e.committedValue;if("function"==typeof r){const e=n.getRootNode().host||n;r.call(e,t)}}});e._handler=t,n.addEventListener(s,t)}else if("object"==typeof r&&r?.handleEvent){const t={handleEvent:t=>r.handleEvent.call(r,t)};e._handler=t,n.addEventListener(s,t,{capture:r.capture,once:r.once,passive:r.passive})}e.committedValue=r;break}case".":n[s]=r===t?void 0:r;break;case"?":n.toggleAttribute(s,!!r);break;case"ref":"function"==typeof r&&r(n);break;case"class":if("string"==typeof r)n.className=r;else if("object"==typeof r&&null!=r){const t=n.className||"",e=t?t.split(/\s+/):[];for(const[t,n]of Object.entries(r))if(n)e.includes(t)||e.push(t);else{const r=e.indexOf(t);-1!==r&&e.splice(r,1)}n.className=e.filter(Boolean).join(" ")}break;default:null==r||!1===r?n.removeAttribute(s):n.setAttribute(s,!0===r?"":String(r))}}function a(t,e,o){if(!r(t))return void(e.textContent=t??"");const{strings:a,values:c}=t;if(e._luxActiveParts&&e._luxStrings===a){for(const t of e._luxActiveParts)t.index<c.length&&("child"===t.type?s(t.span,c[t.index]):i(t,c[t.index]));return}const l=document.createElement("template"),d=function(t){const e=[];let r="";for(let s=0;s<t.length;s++)if(r+=t[s],s<t.length-1){const t=r.match(n);if(t){const n=t[1],o=!!t[2],i=!!t[3];let a="",c="";n?(a=n[0],c=n.slice(1)):o?(a="ref",c="ref"):i&&(a="class",c="class");const l=`lux-attr-${s}`;r=r.slice(0,-t[0].length)+`${l}="${c}" `,e.push({type:"attr",name:c,prefix:a,marker:l,index:s})}else{const t=`lux-${s}`;r+=`\x3c!--${t}--\x3e`,e.push({type:"child",marker:t,index:s})}}return{html:r,parts:e}}(a);l.innerHTML=d.html;const p=l.content.cloneNode(!0),u=[];for(const t of d.parts)if("child"===t.type){const e=document.createTreeWalker(p,NodeFilter.SHOW_COMMENT);let r;for(;r=e.nextNode();)if(r.data===t.marker){const e=document.createElement("span");e.style.display="contents",r.parentNode.replaceChild(e,r),s(e,c[t.index]),u.push({type:"child",span:e,index:t.index});break}}else{const e=p.querySelector(`[${t.marker}]`);if(e){e.removeAttribute(t.marker);const r={type:"attr",element:e,name:t.name,prefix:t.prefix,index:t.index,committedValue:void 0};i(r,c[t.index]),u.push(r)}}e.textContent="",e.appendChild(p),e._luxActiveParts=u,e._luxStrings=a}const c=new Set;let l=!1;function d(t){var e;c.add(t),l||(l=!0,e=()=>{l=!1;const t=[...c];c.clear();for(const e of t)e._$performUpdate()},Promise.resolve().then(e))}const p={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?null:JSON.stringify(t);default:return t}},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);case Object:case Array:try{return JSON.parse(t)}catch{return null}default:return t}}};class u extends HTMLElement{static properties={};static styles=void 0;static finalized=!1;static elementProperties=new Map;static __prepare(){if(this.hasOwnProperty("elementProperties"))return;const t=Object.getPrototypeOf(this);t.finalize&&t.finalize(),this.elementProperties=new Map(t.elementProperties)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap?[...this.__attributeToPropertyMap.keys()]:[]}static finalize(){if(!this.hasOwnProperty("finalized")){if(this.finalized=!0,this.__prepare(),this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of e)this.createProperty(r,t[r])}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const r=this.__attributeNameForProperty(t,e);void 0!==r&&this.__attributeToPropertyMap.set(r,t)}this.elementStyles=this.styles}}static __attributeNameForProperty(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.replace(/([A-Z])/g,"-$1").toLowerCase():void 0}static createProperty(t,e={}){if(this.__prepare(),!this.elementProperties.has(t)&&(e.state&&(e={...e,attribute:!1}),this.elementProperties.set(t,e),!e.noAccessor)){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{type:n,reflect:s,converter:o}=r;return{get(){return this[e]},set(n){const s=this[e];this[e]=n,this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static _initializers=[];static addInitializer(t){this._initializers=[...this._initializers||[],t]}static shadowRootOptions={mode:"open"};constructor(){super(),this.__updatePending=!1,this.__hasUpdated=!1,this.__controllers=new Set,this.__reflectingProperty=null,this.constructor.hasOwnProperty("finalized")||this.constructor.finalize(),this.__saveInstanceProperties(),this.requestUpdate();for(const t of this.constructor._initializers||[])t(this)}__saveInstanceProperties(){const t=this.constructor.elementProperties;if(t)for(const[e,r]of t)if(!r.noAccessor&&this.hasOwnProperty(e)){const t=this[e];delete this[e],this.__instancePropertyValues=this.__instancePropertyValues||new Map,this.__instancePropertyValues.set(e,t)}}connectedCallback(){this.__controllers.forEach(t=>t.hostConnected?.()),this.constructor.hasOwnProperty("finalized")||this.constructor.finalize();const t=this.constructor.__attributeToPropertyMap;if(t)for(const[e,r]of t){const t=this.getAttribute(e);if(null!==t){const e=this.constructor.elementProperties.get(r);if(e){const n=e.converter?.fromAttribute??p.fromAttribute;this[r]=n(t,e.type)}}}if(this.__instancePropertyValues){for(const[t,e]of this.__instancePropertyValues)this[t]=e;this.__instancePropertyValues=void 0}this.renderRoot,this.__hasUpdated||this.requestUpdate()}disconnectedCallback(){this.__controllers.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){const n=this.constructor.__attributeToPropertyMap?.get(t);if(void 0!==n&&this.__reflectingProperty!==n){const t=this.constructor.elementProperties.get(n);if(t){const e="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:p;this.__reflectingProperty=n;const s=e.fromAttribute(r,t.type);this[n]=s,this.__reflectingProperty=null}}}get renderRoot(){return this._renderRoot||(this._renderRoot=this.createRenderRoot(),this.__adoptStyles()),this._renderRoot}createRenderRoot(){return this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions)}__adoptStyles(){const t=this.constructor.elementStyles;if(!t)return;const e=Array.isArray(t)?t:[t],n=[];for(const t of e)"string"==typeof t?n.push(t):r(t)&&n.push(t.strings.join(""));if(0!==n.length)if(void 0!==this._renderRoot.adoptedStyleSheets){const t=new CSSStyleSheet;t.replaceSync(n.join("\n")),this._renderRoot.adoptedStyleSheets=[...this._renderRoot.adoptedStyleSheets,t]}else{const t=document.createElement("style");t.textContent=n.join("\n"),this._renderRoot.appendChild(t)}}enableUpdating(t){}get updateComplete(){return this.__updateCompletePromise??Promise.resolve()}get hasUpdated(){return this.__hasUpdated}get isUpdatePending(){return this.__updatePending}requestUpdate(t,e,r){if(void 0!==t){if(!(r?.hasChanged??((t,e)=>!Object.is(t,e)))(this[t],e))return}this.__updatePending||(this.__updatePending=!0,d(this))}async performUpdate(){if(this.isUpdatePending){this.__updatePending=!1,this.willUpdate(new Map),this.__controllers.forEach(t=>t.hostUpdate?.()),this.update(new Map),this.__hasUpdated=!0;for(const[t,e]of this.constructor.elementProperties)if(e.reflect){const r=this[t],n=e.converter?.toAttribute??p.toAttribute,s=this.constructor.__attributeNameForProperty(t,e);if(void 0!==s){this.__reflectingProperty=t;const o=n(r,e.type);null==o?this.removeAttribute(s):this.setAttribute(s,String(o)),this.__reflectingProperty=null}}this.__controllers.forEach(t=>t.hostUpdated?.()),this.firstUpdated(new Map),this.updated(new Map)}}_$performUpdate(){this.performUpdate()}shouldUpdate(t){return!0}willUpdate(t){}update(t){const e=this.render();e&&a(e,this.renderRoot)}render(){return e``}firstUpdated(t){}updated(t){}propertyChangedCallback(t,e,r){}addController(t){this.__controllers.add(t),this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers.delete(t)}emit(t,e,r={}){return this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,...r}))}$(t){return this.renderRoot.querySelector(t)}$$(t){return this.renderRoot.querySelectorAll(t)}}const h=(function(t,...e){return{_$luxType$:3,strings:t,values:e}})`
2
+ :host {
3
+ display: block;
4
+ border: 1px solid rgb(var(--lux-border, 51 65 85));
5
+ border-radius: var(--lux-radius, 6px);
6
+ background: rgb(var(--lux-card, 30 41 59));
7
+ margin-bottom: var(--lux-space-4, 1rem);
8
+ }
9
+
10
+ .header {
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: space-between;
14
+ padding: 12px 16px;
15
+ border-bottom: 1px solid rgb(var(--lux-border, 51 65 85));
16
+ cursor: pointer;
17
+ user-select: none;
18
+ transition: background var(--lux-transition, 150ms ease);
19
+ }
20
+ .header:hover {
21
+ background: rgba(0, 0, 0, 0.03);
22
+ }
23
+
24
+ .title {
25
+ font-size: var(--lux-font-sm, 0.875rem);
26
+ font-weight: 600;
27
+ color: rgb(var(--lux-text, 241 245 249));
28
+ }
29
+
30
+ .toggle-btn {
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 24px;
35
+ height: 24px;
36
+ border: none;
37
+ border-radius: var(--lux-radius-sm, 4px);
38
+ background: transparent;
39
+ color: rgb(var(--lux-text-secondary, 148 163 184));
40
+ cursor: pointer;
41
+ transition: all var(--lux-transition, 150ms ease);
42
+ font-size: 14px;
43
+ }
44
+ .toggle-btn:hover {
45
+ background: rgba(0, 0, 0, 0.05);
46
+ color: rgb(var(--lux-text, 241 245 249));
47
+ }
48
+ .toggle-icon {
49
+ transition: transform var(--lux-transition, 150ms ease);
50
+ display: inline-block;
51
+ }
52
+ :host([expanded]) .toggle-icon {
53
+ transform: rotate(180deg);
54
+ }
55
+
56
+ .main {
57
+ padding: 16px;
58
+ }
59
+
60
+ .footer {
61
+ padding: 12px 16px;
62
+ border-top: 1px solid rgb(var(--lux-border, 51 65 85));
63
+ background: rgb(var(--lux-bg, 248 250 252));
64
+ color: rgb(var(--lux-text-secondary, 148 163 184));
65
+ font-size: var(--lux-font-sm, 0.875rem);
66
+ display: none;
67
+ }
68
+
69
+ :host([expanded]) .footer {
70
+ display: block;
71
+ }
72
+ `;class f extends u{static styles=h;static properties={expanded:{type:Boolean,reflect:!0}};constructor(){super(),this.expanded=!1}_toggle(){this.expanded=!this.expanded}render(){return e`
73
+ <div class="header" @click=${()=>this._toggle()}>
74
+ <span class="title"><slot name="heading"></slot></span>
75
+ <button
76
+ class="toggle-btn"
77
+ @click=${t=>{t.stopPropagation(),this._toggle()}}
78
+ >
79
+ <span class="toggle-icon">▼</span>
80
+ </button>
81
+ </div>
82
+ <div class="main">
83
+ <slot name="main"></slot>
84
+ </div>
85
+ <div class="footer">
86
+ <slot name="footer"></slot>
87
+ </div>
88
+ `}}return function(t,e){if(!t.includes("-"))throw new Error(`Component name must contain a hyphen: ${t}`);customElements.get(t)||customElements.define(t,e)}("lux-example",f),f}();
@@ -0,0 +1,88 @@
1
+ const t=Symbol.for("lux-nothing");function e(t,...e){return{_$luxType$:1,strings:t,values:e}}function r(t){return t&&void 0!==t._$luxType$}const n=/(?:([@.?][\w-]+)|(ref)|(class))=\s*$/;function s(e,n,s){if(n!==t&&null!=n)if(function(t){return t&&"repeat"===t._type}(n))!function(t,e){const{items:n,keyFn:s,renderFn:o}=e,i=t._repeatState;if(i)for(const t of i.entries)t.span&&t.span.parentNode&&t.span.parentNode.removeChild(t.span);const c=document.createDocumentFragment(),l=[];for(const t of n){const e=s(t),n=o(t),i=document.createElement("span");i.style.display="contents",r(n)?a(n,i):null!=n&&!1!==n&&i.appendChild(document.createTextNode(String(n))),c.appendChild(i),l.push({key:e,result:n,span:i})}t.appendChild(c),t._repeatState={entries:l}}(e,n);else if(r(n))a(n,e);else if(Array.isArray(n)){o(e);for(const t of n)if(r(t)){const r=document.createElement("span");r.style.display="contents",a(t,r),e.appendChild(r)}else t instanceof Node?e.appendChild(t):null!=t&&!1!==t&&e.appendChild(document.createTextNode(String(t)))}else{if(n instanceof Node)return o(e),void e.appendChild(n);1===e.childNodes.length&&e.firstChild.nodeType===Node.TEXT_NODE?e.firstChild.textContent=String(n):(o(e),e.appendChild(document.createTextNode(String(n))))}else o(e)}function o(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function i(e,r){const{element:n,name:s,prefix:o}=e;switch(o){case"@":{const o=e.committedValue,i=null==r||r===t,a=i&&null!=o||r?.capture!==o?.capture||r?.once!==o?.once||r?.passive!==o?.passive,c=!i&&(null==o||a);if(a&&n.removeEventListener(s,e._handler||o,o),c)if("function"==typeof r){const t=e._host||(e._host={handleEvent(t){const r=e.committedValue;if("function"==typeof r){const e=n.getRootNode().host||n;r.call(e,t)}}});e._handler=t,n.addEventListener(s,t)}else if("object"==typeof r&&r?.handleEvent){const t={handleEvent:t=>r.handleEvent.call(r,t)};e._handler=t,n.addEventListener(s,t,{capture:r.capture,once:r.once,passive:r.passive})}e.committedValue=r;break}case".":n[s]=r===t?void 0:r;break;case"?":n.toggleAttribute(s,!!r);break;case"ref":"function"==typeof r&&r(n);break;case"class":if("string"==typeof r)n.className=r;else if("object"==typeof r&&null!=r){const t=n.className||"",e=t?t.split(/\s+/):[];for(const[t,n]of Object.entries(r))if(n)e.includes(t)||e.push(t);else{const r=e.indexOf(t);-1!==r&&e.splice(r,1)}n.className=e.filter(Boolean).join(" ")}break;default:null==r||!1===r?n.removeAttribute(s):n.setAttribute(s,!0===r?"":String(r))}}function a(t,e,o){if(!r(t))return void(e.textContent=t??"");const{strings:a,values:c}=t;if(e._luxActiveParts&&e._luxStrings===a){for(const t of e._luxActiveParts)t.index<c.length&&("child"===t.type?s(t.span,c[t.index]):i(t,c[t.index]));return}const l=document.createElement("template"),d=function(t){const e=[];let r="";for(let s=0;s<t.length;s++)if(r+=t[s],s<t.length-1){const t=r.match(n);if(t){const n=t[1],o=!!t[2],i=!!t[3];let a="",c="";n?(a=n[0],c=n.slice(1)):o?(a="ref",c="ref"):i&&(a="class",c="class");const l=`lux-attr-${s}`;r=r.slice(0,-t[0].length)+`${l}="${c}" `,e.push({type:"attr",name:c,prefix:a,marker:l,index:s})}else{const t=`lux-${s}`;r+=`\x3c!--${t}--\x3e`,e.push({type:"child",marker:t,index:s})}}return{html:r,parts:e}}(a);l.innerHTML=d.html;const p=l.content.cloneNode(!0),u=[];for(const t of d.parts)if("child"===t.type){const e=document.createTreeWalker(p,NodeFilter.SHOW_COMMENT);let r;for(;r=e.nextNode();)if(r.data===t.marker){const e=document.createElement("span");e.style.display="contents",r.parentNode.replaceChild(e,r),s(e,c[t.index]),u.push({type:"child",span:e,index:t.index});break}}else{const e=p.querySelector(`[${t.marker}]`);if(e){e.removeAttribute(t.marker);const r={type:"attr",element:e,name:t.name,prefix:t.prefix,index:t.index,committedValue:void 0};i(r,c[t.index]),u.push(r)}}e.textContent="",e.appendChild(p),e._luxActiveParts=u,e._luxStrings=a}const c=new Set;let l=!1;function d(t){var e;c.add(t),l||(l=!0,e=()=>{l=!1;const t=[...c];c.clear();for(const e of t)e._$performUpdate()},Promise.resolve().then(e))}const p={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?null:JSON.stringify(t);default:return t}},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);case Object:case Array:try{return JSON.parse(t)}catch{return null}default:return t}}};class u extends HTMLElement{static properties={};static styles=void 0;static finalized=!1;static elementProperties=new Map;static __prepare(){if(this.hasOwnProperty("elementProperties"))return;const t=Object.getPrototypeOf(this);t.finalize&&t.finalize(),this.elementProperties=new Map(t.elementProperties)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap?[...this.__attributeToPropertyMap.keys()]:[]}static finalize(){if(!this.hasOwnProperty("finalized")){if(this.finalized=!0,this.__prepare(),this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of e)this.createProperty(r,t[r])}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const r=this.__attributeNameForProperty(t,e);void 0!==r&&this.__attributeToPropertyMap.set(r,t)}this.elementStyles=this.styles}}static __attributeNameForProperty(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.replace(/([A-Z])/g,"-$1").toLowerCase():void 0}static createProperty(t,e={}){if(this.__prepare(),!this.elementProperties.has(t)&&(e.state&&(e={...e,attribute:!1}),this.elementProperties.set(t,e),!e.noAccessor)){const r=Symbol(),n=this.getPropertyDescriptor(t,r,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){const{type:n,reflect:s,converter:o}=r;return{get(){return this[e]},set(n){const s=this[e];this[e]=n,this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static _initializers=[];static addInitializer(t){this._initializers=[...this._initializers||[],t]}static shadowRootOptions={mode:"open"};constructor(){super(),this.__updatePending=!1,this.__hasUpdated=!1,this.__controllers=new Set,this.__reflectingProperty=null,this.constructor.hasOwnProperty("finalized")||this.constructor.finalize(),this.__saveInstanceProperties(),this.requestUpdate();for(const t of this.constructor._initializers||[])t(this)}__saveInstanceProperties(){const t=this.constructor.elementProperties;if(t)for(const[e,r]of t)if(!r.noAccessor&&this.hasOwnProperty(e)){const t=this[e];delete this[e],this.__instancePropertyValues=this.__instancePropertyValues||new Map,this.__instancePropertyValues.set(e,t)}}connectedCallback(){this.__controllers.forEach(t=>t.hostConnected?.()),this.constructor.hasOwnProperty("finalized")||this.constructor.finalize();const t=this.constructor.__attributeToPropertyMap;if(t)for(const[e,r]of t){const t=this.getAttribute(e);if(null!==t){const e=this.constructor.elementProperties.get(r);if(e){const n=e.converter?.fromAttribute??p.fromAttribute;this[r]=n(t,e.type)}}}if(this.__instancePropertyValues){for(const[t,e]of this.__instancePropertyValues)this[t]=e;this.__instancePropertyValues=void 0}this.renderRoot,this.__hasUpdated||this.requestUpdate()}disconnectedCallback(){this.__controllers.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){const n=this.constructor.__attributeToPropertyMap?.get(t);if(void 0!==n&&this.__reflectingProperty!==n){const t=this.constructor.elementProperties.get(n);if(t){const e="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:p;this.__reflectingProperty=n;const s=e.fromAttribute(r,t.type);this[n]=s,this.__reflectingProperty=null}}}get renderRoot(){return this._renderRoot||(this._renderRoot=this.createRenderRoot(),this.__adoptStyles()),this._renderRoot}createRenderRoot(){return this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions)}__adoptStyles(){const t=this.constructor.elementStyles;if(!t)return;const e=Array.isArray(t)?t:[t],n=[];for(const t of e)"string"==typeof t?n.push(t):r(t)&&n.push(t.strings.join(""));if(0!==n.length)if(void 0!==this._renderRoot.adoptedStyleSheets){const t=new CSSStyleSheet;t.replaceSync(n.join("\n")),this._renderRoot.adoptedStyleSheets=[...this._renderRoot.adoptedStyleSheets,t]}else{const t=document.createElement("style");t.textContent=n.join("\n"),this._renderRoot.appendChild(t)}}enableUpdating(t){}get updateComplete(){return this.__updateCompletePromise??Promise.resolve()}get hasUpdated(){return this.__hasUpdated}get isUpdatePending(){return this.__updatePending}requestUpdate(t,e,r){if(void 0!==t){if(!(r?.hasChanged??((t,e)=>!Object.is(t,e)))(this[t],e))return}this.__updatePending||(this.__updatePending=!0,d(this))}async performUpdate(){if(this.isUpdatePending){this.__updatePending=!1,this.willUpdate(new Map),this.__controllers.forEach(t=>t.hostUpdate?.()),this.update(new Map),this.__hasUpdated=!0;for(const[t,e]of this.constructor.elementProperties)if(e.reflect){const r=this[t],n=e.converter?.toAttribute??p.toAttribute,s=this.constructor.__attributeNameForProperty(t,e);if(void 0!==s){this.__reflectingProperty=t;const o=n(r,e.type);null==o?this.removeAttribute(s):this.setAttribute(s,String(o)),this.__reflectingProperty=null}}this.__controllers.forEach(t=>t.hostUpdated?.()),this.firstUpdated(new Map),this.updated(new Map)}}_$performUpdate(){this.performUpdate()}shouldUpdate(t){return!0}willUpdate(t){}update(t){const e=this.render();e&&a(e,this.renderRoot)}render(){return e``}firstUpdated(t){}updated(t){}propertyChangedCallback(t,e,r){}addController(t){this.__controllers.add(t),this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers.delete(t)}emit(t,e,r={}){return this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,...r}))}$(t){return this.renderRoot.querySelector(t)}$$(t){return this.renderRoot.querySelectorAll(t)}}const h=(function(t,...e){return{_$luxType$:3,strings:t,values:e}})`
2
+ :host {
3
+ display: block;
4
+ border: 1px solid rgb(var(--lux-border, 51 65 85));
5
+ border-radius: var(--lux-radius, 6px);
6
+ background: rgb(var(--lux-card, 30 41 59));
7
+ margin-bottom: var(--lux-space-4, 1rem);
8
+ }
9
+
10
+ .header {
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: space-between;
14
+ padding: 12px 16px;
15
+ border-bottom: 1px solid rgb(var(--lux-border, 51 65 85));
16
+ cursor: pointer;
17
+ user-select: none;
18
+ transition: background var(--lux-transition, 150ms ease);
19
+ }
20
+ .header:hover {
21
+ background: rgba(0, 0, 0, 0.03);
22
+ }
23
+
24
+ .title {
25
+ font-size: var(--lux-font-sm, 0.875rem);
26
+ font-weight: 600;
27
+ color: rgb(var(--lux-text, 241 245 249));
28
+ }
29
+
30
+ .toggle-btn {
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 24px;
35
+ height: 24px;
36
+ border: none;
37
+ border-radius: var(--lux-radius-sm, 4px);
38
+ background: transparent;
39
+ color: rgb(var(--lux-text-secondary, 148 163 184));
40
+ cursor: pointer;
41
+ transition: all var(--lux-transition, 150ms ease);
42
+ font-size: 14px;
43
+ }
44
+ .toggle-btn:hover {
45
+ background: rgba(0, 0, 0, 0.05);
46
+ color: rgb(var(--lux-text, 241 245 249));
47
+ }
48
+ .toggle-icon {
49
+ transition: transform var(--lux-transition, 150ms ease);
50
+ display: inline-block;
51
+ }
52
+ :host([expanded]) .toggle-icon {
53
+ transform: rotate(180deg);
54
+ }
55
+
56
+ .main {
57
+ padding: 16px;
58
+ }
59
+
60
+ .footer {
61
+ padding: 12px 16px;
62
+ border-top: 1px solid rgb(var(--lux-border, 51 65 85));
63
+ background: rgb(var(--lux-bg, 248 250 252));
64
+ color: rgb(var(--lux-text-secondary, 148 163 184));
65
+ font-size: var(--lux-font-sm, 0.875rem);
66
+ display: none;
67
+ }
68
+
69
+ :host([expanded]) .footer {
70
+ display: block;
71
+ }
72
+ `;class f extends u{static styles=h;static properties={expanded:{type:Boolean,reflect:!0}};constructor(){super(),this.expanded=!1}_toggle(){this.expanded=!this.expanded}render(){return e`
73
+ <div class="header" @click=${()=>this._toggle()}>
74
+ <span class="title"><slot name="heading"></slot></span>
75
+ <button
76
+ class="toggle-btn"
77
+ @click=${t=>{t.stopPropagation(),this._toggle()}}
78
+ >
79
+ <span class="toggle-icon">▼</span>
80
+ </button>
81
+ </div>
82
+ <div class="main">
83
+ <slot name="main"></slot>
84
+ </div>
85
+ <div class="footer">
86
+ <slot name="footer"></slot>
87
+ </div>
88
+ `}}!function(t,e){if(!t.includes("-"))throw new Error(`Component name must contain a hyphen: ${t}`);customElements.get(t)||customElements.define(t,e)}("lux-example",f);export{f as default};
@@ -0,0 +1,22 @@
1
+ var LuxIcon=function(t){"use strict";const e=Symbol.for("lux-nothing");function s(t,...e){return{_$luxType$:1,strings:t,values:e}}function r(t){return t&&void 0!==t._$luxType$}const n=/(?:([@.?][\w-]+)|(ref)|(class))=\s*$/;function o(t,s,n){if(s!==e&&null!=s)if(function(t){return t&&"repeat"===t._type}(s))!function(t,e){const{items:s,keyFn:n,renderFn:o}=e,i=t._repeatState;if(i)for(const t of i.entries)t.span&&t.span.parentNode&&t.span.parentNode.removeChild(t.span);const c=document.createDocumentFragment(),a=[];for(const t of s){const e=n(t),s=o(t),i=document.createElement("span");i.style.display="contents",r(s)?h(s,i):null!=s&&!1!==s&&i.appendChild(document.createTextNode(String(s))),c.appendChild(i),a.push({key:e,result:s,span:i})}t.appendChild(c),t._repeatState={entries:a}}(t,s);else if(r(s))h(s,t);else if(Array.isArray(s)){i(t);for(const e of s)if(r(e)){const s=document.createElement("span");s.style.display="contents",h(e,s),t.appendChild(s)}else e instanceof Node?t.appendChild(e):null!=e&&!1!==e&&t.appendChild(document.createTextNode(String(e)))}else{if(s instanceof Node)return i(t),void t.appendChild(s);1===t.childNodes.length&&t.firstChild.nodeType===Node.TEXT_NODE?t.firstChild.textContent=String(s):(i(t),t.appendChild(document.createTextNode(String(s))))}else i(t)}function i(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function c(t,s){const{element:r,name:n,prefix:o}=t;switch(o){case"@":{const o=t.committedValue,i=null==s||s===e,c=i&&null!=o||s?.capture!==o?.capture||s?.once!==o?.once||s?.passive!==o?.passive,h=!i&&(null==o||c);if(c&&r.removeEventListener(n,t._handler||o,o),h)if("function"==typeof s){const e=t._host||(t._host={handleEvent(e){const s=t.committedValue;if("function"==typeof s){const t=r.getRootNode().host||r;s.call(t,e)}}});t._handler=e,r.addEventListener(n,e)}else if("object"==typeof s&&s?.handleEvent){const e={handleEvent:t=>s.handleEvent.call(s,t)};t._handler=e,r.addEventListener(n,e,{capture:s.capture,once:s.once,passive:s.passive})}t.committedValue=s;break}case".":r[n]=s===e?void 0:s;break;case"?":r.toggleAttribute(n,!!s);break;case"ref":"function"==typeof s&&s(r);break;case"class":if("string"==typeof s)r.className=s;else if("object"==typeof s&&null!=s){const t=r.className||"",e=t?t.split(/\s+/):[];for(const[t,r]of Object.entries(s))if(r)e.includes(t)||e.push(t);else{const s=e.indexOf(t);-1!==s&&e.splice(s,1)}r.className=e.filter(Boolean).join(" ")}break;default:null==s||!1===s?r.removeAttribute(n):r.setAttribute(n,!0===s?"":String(s))}}function h(t,e,s){if(!r(t))return void(e.textContent=t??"");const{strings:i,values:h}=t;if(e._luxActiveParts&&e._luxStrings===i){for(const t of e._luxActiveParts)t.index<h.length&&("child"===t.type?o(t.span,h[t.index]):c(t,h[t.index]));return}const a=document.createElement("template"),l=function(t){const e=[];let s="";for(let r=0;r<t.length;r++)if(s+=t[r],r<t.length-1){const t=s.match(n);if(t){const n=t[1],o=!!t[2],i=!!t[3];let c="",h="";n?(c=n[0],h=n.slice(1)):o?(c="ref",h="ref"):i&&(c="class",h="class");const a=`lux-attr-${r}`;s=s.slice(0,-t[0].length)+`${a}="${h}" `,e.push({type:"attr",name:h,prefix:c,marker:a,index:r})}else{const t=`lux-${r}`;s+=`\x3c!--${t}--\x3e`,e.push({type:"child",marker:t,index:r})}}return{html:s,parts:e}}(i);a.innerHTML=l.html;const d=a.content.cloneNode(!0),p=[];for(const t of l.parts)if("child"===t.type){const e=document.createTreeWalker(d,NodeFilter.SHOW_COMMENT);let s;for(;s=e.nextNode();)if(s.data===t.marker){const e=document.createElement("span");e.style.display="contents",s.parentNode.replaceChild(e,s),o(e,h[t.index]),p.push({type:"child",span:e,index:t.index});break}}else{const e=d.querySelector(`[${t.marker}]`);if(e){e.removeAttribute(t.marker);const s={type:"attr",element:e,name:t.name,prefix:t.prefix,index:t.index,committedValue:void 0};c(s,h[t.index]),p.push(s)}}e.textContent="",e.appendChild(d),e._luxActiveParts=p,e._luxStrings=i}const a=new Set;let l=!1;function d(t){var e;a.add(t),l||(l=!0,e=()=>{l=!1;const t=[...a];a.clear();for(const e of t)e._$performUpdate()},Promise.resolve().then(e))}const p={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?null:JSON.stringify(t);default:return t}},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);case Object:case Array:try{return JSON.parse(t)}catch{return null}default:return t}}};class u extends HTMLElement{static properties={};static styles=void 0;static finalized=!1;static elementProperties=new Map;static __prepare(){if(this.hasOwnProperty("elementProperties"))return;const t=Object.getPrototypeOf(this);t.finalize&&t.finalize(),this.elementProperties=new Map(t.elementProperties)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap?[...this.__attributeToPropertyMap.keys()]:[]}static finalize(){if(!this.hasOwnProperty("finalized")){if(this.finalized=!0,this.__prepare(),this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.styles}}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.replace(/([A-Z])/g,"-$1").toLowerCase():void 0}static createProperty(t,e={}){if(this.__prepare(),!this.elementProperties.has(t)&&(e.state&&(e={...e,attribute:!1}),this.elementProperties.set(t,e),!e.noAccessor)){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{type:r,reflect:n,converter:o}=s;return{get(){return this[e]},set(r){const n=this[e];this[e]=r,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static _initializers=[];static addInitializer(t){this._initializers=[...this._initializers||[],t]}static shadowRootOptions={mode:"open"};constructor(){super(),this.__updatePending=!1,this.__hasUpdated=!1,this.__controllers=new Set,this.__reflectingProperty=null,this.constructor.hasOwnProperty("finalized")||this.constructor.finalize(),this.__saveInstanceProperties(),this.requestUpdate();for(const t of this.constructor._initializers||[])t(this)}__saveInstanceProperties(){const t=this.constructor.elementProperties;if(t)for(const[e,s]of t)if(!s.noAccessor&&this.hasOwnProperty(e)){const t=this[e];delete this[e],this.__instancePropertyValues=this.__instancePropertyValues||new Map,this.__instancePropertyValues.set(e,t)}}connectedCallback(){this.__controllers.forEach(t=>t.hostConnected?.()),this.constructor.hasOwnProperty("finalized")||this.constructor.finalize();const t=this.constructor.__attributeToPropertyMap;if(t)for(const[e,s]of t){const t=this.getAttribute(e);if(null!==t){const e=this.constructor.elementProperties.get(s);if(e){const r=e.converter?.fromAttribute??p.fromAttribute;this[s]=r(t,e.type)}}}if(this.__instancePropertyValues){for(const[t,e]of this.__instancePropertyValues)this[t]=e;this.__instancePropertyValues=void 0}this.renderRoot,this.__hasUpdated||this.requestUpdate()}disconnectedCallback(){this.__controllers.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){const r=this.constructor.__attributeToPropertyMap?.get(t);if(void 0!==r&&this.__reflectingProperty!==r){const t=this.constructor.elementProperties.get(r);if(t){const e="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:p;this.__reflectingProperty=r;const n=e.fromAttribute(s,t.type);this[r]=n,this.__reflectingProperty=null}}}get renderRoot(){return this._renderRoot||(this._renderRoot=this.createRenderRoot(),this.__adoptStyles()),this._renderRoot}createRenderRoot(){return this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions)}__adoptStyles(){const t=this.constructor.elementStyles;if(!t)return;const e=Array.isArray(t)?t:[t],s=[];for(const t of e)"string"==typeof t?s.push(t):r(t)&&s.push(t.strings.join(""));if(0!==s.length)if(void 0!==this._renderRoot.adoptedStyleSheets){const t=new CSSStyleSheet;t.replaceSync(s.join("\n")),this._renderRoot.adoptedStyleSheets=[...this._renderRoot.adoptedStyleSheets,t]}else{const t=document.createElement("style");t.textContent=s.join("\n"),this._renderRoot.appendChild(t)}}enableUpdating(t){}get updateComplete(){return this.__updateCompletePromise??Promise.resolve()}get hasUpdated(){return this.__hasUpdated}get isUpdatePending(){return this.__updatePending}requestUpdate(t,e,s){if(void 0!==t){if(!(s?.hasChanged??((t,e)=>!Object.is(t,e)))(this[t],e))return}this.__updatePending||(this.__updatePending=!0,d(this))}async performUpdate(){if(this.isUpdatePending){this.__updatePending=!1,this.willUpdate(new Map),this.__controllers.forEach(t=>t.hostUpdate?.()),this.update(new Map),this.__hasUpdated=!0;for(const[t,e]of this.constructor.elementProperties)if(e.reflect){const s=this[t],r=e.converter?.toAttribute??p.toAttribute,n=this.constructor.__attributeNameForProperty(t,e);if(void 0!==n){this.__reflectingProperty=t;const o=r(s,e.type);null==o?this.removeAttribute(n):this.setAttribute(n,String(o)),this.__reflectingProperty=null}}this.__controllers.forEach(t=>t.hostUpdated?.()),this.firstUpdated(new Map),this.updated(new Map)}}_$performUpdate(){this.performUpdate()}shouldUpdate(t){return!0}willUpdate(t){}update(t){const e=this.render();e&&h(e,this.renderRoot)}render(){return s``}firstUpdated(t){}updated(t){}propertyChangedCallback(t,e,s){}addController(t){this.__controllers.add(t),this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers.delete(t)}emit(t,e,s={}){return this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,...s}))}$(t){return this.renderRoot.querySelector(t)}$$(t){return this.renderRoot.querySelectorAll(t)}}const v={check:'<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/>',content_copy:'<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>',close:'<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>',search:'<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>',menu:'<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>',arrow_back:'<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>',arrow_forward:'<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/>',add:'<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>',remove:'<path d="M19 13H5v-2h14v2z"/>',edit:'<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/>',delete:'<path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>',home:'<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>',settings:'<path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>',star:'<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>',heart:'<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>',share:'<path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/>',link:'<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.1 0-2-.9-2-2s.9-2 2-2h4v-1.9H7c-2.76 0-5 2.24-5 5zm7-3h4v1.9h-4V9zm3.9 6h-4v1.9h4c1.1 0 2-.9 2-2s-.9-2-2-2h-4v-1.9h4c2.76 0 5 2.24 5 5s-2.24 5-5 5z"/>',download:'<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>',upload:'<path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/>',refresh:'<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.73 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>',more_vert:'<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>',more_horiz:'<path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm8 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm8 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>',expand_more:'<path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/>',expand_less:'<path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/>',visibility:'<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>',visibility_off:'<path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.12 2.12C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.21.53-2.76 0-5-2.24-5-5 0-.8.2-1.54.53-2.21zm4.21-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/>',info:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>',warning:'<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>',error_outline:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>',help_outline:'<path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 1-2.5 3-5V8c-1.1 0-2-.9-2-2zm0 10c-.59 0-1-.51-1-1s.41-1 1-1 1 .51 1 1-.41 1-1 1z"/>',light_mode:'<path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"/>',dark_mode:'<path d="M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49zM12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"/>',view_quilt:'<path d="M3 3v8h8V3H3zm6 6H5V5h4v4zm-6 4v8h8v-8H3zm6 6H5v-4h4v4zm4-16v8h8V3h-8zm6 6h-4V5h4v4zm-6 4v8h8v-8h-8zm6 6h-4v-4h4v4z"/>',code:'<path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0L19.2 12l-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/>',toggle_on:'<path d="M6 7h12a5 5 0 010 10H6a5 5 0 010-10z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="18" cy="12" r="3"/>',swap_vert:'<path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/>',arrow_down:'<path d="M3 8l9 9 9-9H3z"/>',language:'<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/>',smart_button:'<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/>',table_chart:'<path d="M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z"/>',check_circle:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>',cancel:'<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/>',pause:'<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>',play:'<path d="M8 5v14l11-7z"/>',stop:'<path d="M6 6h12v12H6z"/>',save:'<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>',folder:'<path d="M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>',file:'<path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/>',email:'<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>',person:'<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>',lock:'<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/>',filter:'<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>',sort:'<path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/>',calendar:'<path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"/>',map:'<path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"/>',camera:'<path d="M12 12m-3.2 0a3.2 3.2 0 1 0 6.4 0a3.2 3.2 0 1 0-6.4 0M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/>',bookmark:'<path d="M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2z"/>',clock:'<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>',chat:'<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>',phone:'<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/>',notification:'<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>',cloud:'<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/>',download_done:'<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>',github:'<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>',npm:'<path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/>'};const m=(function(t,...e){return{_$luxType$:3,strings:t,values:e}})`
2
+ :host {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ width: 1em;
7
+ height: 1em;
8
+ vertical-align: middle;
9
+ fill: currentColor;
10
+ flex-shrink: 0;
11
+ }
12
+
13
+ :host([size]) {
14
+ width: var(--icon-size);
15
+ height: var(--icon-size);
16
+ }
17
+
18
+ svg {
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ `;class f extends u{static styles=m;static properties={name:{type:String,reflect:!0},size:{type:String,reflect:!0},color:{type:String,reflect:!0}};constructor(){super()}updated(){this.size&&this.style.setProperty("--icon-size",this._parseSize(this.size)),this.color&&(this.style.color=this.color);const t=this.renderRoot.querySelector(".icon-svg");t&&this.name&&v[this.name]&&(t.innerHTML=v[this.name])}_parseSize(t){return null==t?"":"number"==typeof t||/^\d+(\.\d+)?$/.test(t)?t+"px":t}render(){return this.childNodes.length>0?s`<slot></slot>`:this.name&&v[this.name]?s`<svg class="icon-svg" viewBox="0 0 24 24"></svg>`:s`<span style="font-size:0.75em;font-weight:600">${this.name||"?"}</span>`}}return function(t,e){if(!t.includes("-"))throw new Error(`Component name must contain a hyphen: ${t}`);customElements.get(t)||customElements.define(t,e)}("lux-icon",f),t.LuxIcon=f,t.default=f,t.icons=v,t.registerIcons=function(t){Object.assign(v,t)},Object.defineProperty(t,"__esModule",{value:!0}),t}({});
@@ -0,0 +1,22 @@
1
+ const t=Symbol.for("lux-nothing");function e(t,...e){return{_$luxType$:1,strings:t,values:e}}function s(t){return t&&void 0!==t._$luxType$}const r=/(?:([@.?][\w-]+)|(ref)|(class))=\s*$/;function n(e,r,n){if(r!==t&&null!=r)if(function(t){return t&&"repeat"===t._type}(r))!function(t,e){const{items:r,keyFn:n,renderFn:o}=e,i=t._repeatState;if(i)for(const t of i.entries)t.span&&t.span.parentNode&&t.span.parentNode.removeChild(t.span);const h=document.createDocumentFragment(),a=[];for(const t of r){const e=n(t),r=o(t),i=document.createElement("span");i.style.display="contents",s(r)?c(r,i):null!=r&&!1!==r&&i.appendChild(document.createTextNode(String(r))),h.appendChild(i),a.push({key:e,result:r,span:i})}t.appendChild(h),t._repeatState={entries:a}}(e,r);else if(s(r))c(r,e);else if(Array.isArray(r)){o(e);for(const t of r)if(s(t)){const s=document.createElement("span");s.style.display="contents",c(t,s),e.appendChild(s)}else t instanceof Node?e.appendChild(t):null!=t&&!1!==t&&e.appendChild(document.createTextNode(String(t)))}else{if(r instanceof Node)return o(e),void e.appendChild(r);1===e.childNodes.length&&e.firstChild.nodeType===Node.TEXT_NODE?e.firstChild.textContent=String(r):(o(e),e.appendChild(document.createTextNode(String(r))))}else o(e)}function o(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function i(e,s){const{element:r,name:n,prefix:o}=e;switch(o){case"@":{const o=e.committedValue,i=null==s||s===t,c=i&&null!=o||s?.capture!==o?.capture||s?.once!==o?.once||s?.passive!==o?.passive,h=!i&&(null==o||c);if(c&&r.removeEventListener(n,e._handler||o,o),h)if("function"==typeof s){const t=e._host||(e._host={handleEvent(t){const s=e.committedValue;if("function"==typeof s){const e=r.getRootNode().host||r;s.call(e,t)}}});e._handler=t,r.addEventListener(n,t)}else if("object"==typeof s&&s?.handleEvent){const t={handleEvent:t=>s.handleEvent.call(s,t)};e._handler=t,r.addEventListener(n,t,{capture:s.capture,once:s.once,passive:s.passive})}e.committedValue=s;break}case".":r[n]=s===t?void 0:s;break;case"?":r.toggleAttribute(n,!!s);break;case"ref":"function"==typeof s&&s(r);break;case"class":if("string"==typeof s)r.className=s;else if("object"==typeof s&&null!=s){const t=r.className||"",e=t?t.split(/\s+/):[];for(const[t,r]of Object.entries(s))if(r)e.includes(t)||e.push(t);else{const s=e.indexOf(t);-1!==s&&e.splice(s,1)}r.className=e.filter(Boolean).join(" ")}break;default:null==s||!1===s?r.removeAttribute(n):r.setAttribute(n,!0===s?"":String(s))}}function c(t,e,o){if(!s(t))return void(e.textContent=t??"");const{strings:c,values:h}=t;if(e._luxActiveParts&&e._luxStrings===c){for(const t of e._luxActiveParts)t.index<h.length&&("child"===t.type?n(t.span,h[t.index]):i(t,h[t.index]));return}const a=document.createElement("template"),l=function(t){const e=[];let s="";for(let n=0;n<t.length;n++)if(s+=t[n],n<t.length-1){const t=s.match(r);if(t){const r=t[1],o=!!t[2],i=!!t[3];let c="",h="";r?(c=r[0],h=r.slice(1)):o?(c="ref",h="ref"):i&&(c="class",h="class");const a=`lux-attr-${n}`;s=s.slice(0,-t[0].length)+`${a}="${h}" `,e.push({type:"attr",name:h,prefix:c,marker:a,index:n})}else{const t=`lux-${n}`;s+=`\x3c!--${t}--\x3e`,e.push({type:"child",marker:t,index:n})}}return{html:s,parts:e}}(c);a.innerHTML=l.html;const d=a.content.cloneNode(!0),p=[];for(const t of l.parts)if("child"===t.type){const e=document.createTreeWalker(d,NodeFilter.SHOW_COMMENT);let s;for(;s=e.nextNode();)if(s.data===t.marker){const e=document.createElement("span");e.style.display="contents",s.parentNode.replaceChild(e,s),n(e,h[t.index]),p.push({type:"child",span:e,index:t.index});break}}else{const e=d.querySelector(`[${t.marker}]`);if(e){e.removeAttribute(t.marker);const s={type:"attr",element:e,name:t.name,prefix:t.prefix,index:t.index,committedValue:void 0};i(s,h[t.index]),p.push(s)}}e.textContent="",e.appendChild(d),e._luxActiveParts=p,e._luxStrings=c}const h=new Set;let a=!1;function l(t){var e;h.add(t),a||(a=!0,e=()=>{a=!1;const t=[...h];h.clear();for(const e of t)e._$performUpdate()},Promise.resolve().then(e))}const d={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?null:JSON.stringify(t);default:return t}},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);case Object:case Array:try{return JSON.parse(t)}catch{return null}default:return t}}};class p extends HTMLElement{static properties={};static styles=void 0;static finalized=!1;static elementProperties=new Map;static __prepare(){if(this.hasOwnProperty("elementProperties"))return;const t=Object.getPrototypeOf(this);t.finalize&&t.finalize(),this.elementProperties=new Map(t.elementProperties)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap?[...this.__attributeToPropertyMap.keys()]:[]}static finalize(){if(!this.hasOwnProperty("finalized")){if(this.finalized=!0,this.__prepare(),this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.styles}}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.replace(/([A-Z])/g,"-$1").toLowerCase():void 0}static createProperty(t,e={}){if(this.__prepare(),!this.elementProperties.has(t)&&(e.state&&(e={...e,attribute:!1}),this.elementProperties.set(t,e),!e.noAccessor)){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{type:r,reflect:n,converter:o}=s;return{get(){return this[e]},set(r){const n=this[e];this[e]=r,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static _initializers=[];static addInitializer(t){this._initializers=[...this._initializers||[],t]}static shadowRootOptions={mode:"open"};constructor(){super(),this.__updatePending=!1,this.__hasUpdated=!1,this.__controllers=new Set,this.__reflectingProperty=null,this.constructor.hasOwnProperty("finalized")||this.constructor.finalize(),this.__saveInstanceProperties(),this.requestUpdate();for(const t of this.constructor._initializers||[])t(this)}__saveInstanceProperties(){const t=this.constructor.elementProperties;if(t)for(const[e,s]of t)if(!s.noAccessor&&this.hasOwnProperty(e)){const t=this[e];delete this[e],this.__instancePropertyValues=this.__instancePropertyValues||new Map,this.__instancePropertyValues.set(e,t)}}connectedCallback(){this.__controllers.forEach(t=>t.hostConnected?.()),this.constructor.hasOwnProperty("finalized")||this.constructor.finalize();const t=this.constructor.__attributeToPropertyMap;if(t)for(const[e,s]of t){const t=this.getAttribute(e);if(null!==t){const e=this.constructor.elementProperties.get(s);if(e){const r=e.converter?.fromAttribute??d.fromAttribute;this[s]=r(t,e.type)}}}if(this.__instancePropertyValues){for(const[t,e]of this.__instancePropertyValues)this[t]=e;this.__instancePropertyValues=void 0}this.renderRoot,this.__hasUpdated||this.requestUpdate()}disconnectedCallback(){this.__controllers.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){const r=this.constructor.__attributeToPropertyMap?.get(t);if(void 0!==r&&this.__reflectingProperty!==r){const t=this.constructor.elementProperties.get(r);if(t){const e="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:d;this.__reflectingProperty=r;const n=e.fromAttribute(s,t.type);this[r]=n,this.__reflectingProperty=null}}}get renderRoot(){return this._renderRoot||(this._renderRoot=this.createRenderRoot(),this.__adoptStyles()),this._renderRoot}createRenderRoot(){return this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions)}__adoptStyles(){const t=this.constructor.elementStyles;if(!t)return;const e=Array.isArray(t)?t:[t],r=[];for(const t of e)"string"==typeof t?r.push(t):s(t)&&r.push(t.strings.join(""));if(0!==r.length)if(void 0!==this._renderRoot.adoptedStyleSheets){const t=new CSSStyleSheet;t.replaceSync(r.join("\n")),this._renderRoot.adoptedStyleSheets=[...this._renderRoot.adoptedStyleSheets,t]}else{const t=document.createElement("style");t.textContent=r.join("\n"),this._renderRoot.appendChild(t)}}enableUpdating(t){}get updateComplete(){return this.__updateCompletePromise??Promise.resolve()}get hasUpdated(){return this.__hasUpdated}get isUpdatePending(){return this.__updatePending}requestUpdate(t,e,s){if(void 0!==t){if(!(s?.hasChanged??((t,e)=>!Object.is(t,e)))(this[t],e))return}this.__updatePending||(this.__updatePending=!0,l(this))}async performUpdate(){if(this.isUpdatePending){this.__updatePending=!1,this.willUpdate(new Map),this.__controllers.forEach(t=>t.hostUpdate?.()),this.update(new Map),this.__hasUpdated=!0;for(const[t,e]of this.constructor.elementProperties)if(e.reflect){const s=this[t],r=e.converter?.toAttribute??d.toAttribute,n=this.constructor.__attributeNameForProperty(t,e);if(void 0!==n){this.__reflectingProperty=t;const o=r(s,e.type);null==o?this.removeAttribute(n):this.setAttribute(n,String(o)),this.__reflectingProperty=null}}this.__controllers.forEach(t=>t.hostUpdated?.()),this.firstUpdated(new Map),this.updated(new Map)}}_$performUpdate(){this.performUpdate()}shouldUpdate(t){return!0}willUpdate(t){}update(t){const e=this.render();e&&c(e,this.renderRoot)}render(){return e``}firstUpdated(t){}updated(t){}propertyChangedCallback(t,e,s){}addController(t){this.__controllers.add(t),this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers.delete(t)}emit(t,e,s={}){return this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,...s}))}$(t){return this.renderRoot.querySelector(t)}$$(t){return this.renderRoot.querySelectorAll(t)}}const u={check:'<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/>',content_copy:'<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>',close:'<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>',search:'<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>',menu:'<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>',arrow_back:'<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>',arrow_forward:'<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/>',add:'<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>',remove:'<path d="M19 13H5v-2h14v2z"/>',edit:'<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/>',delete:'<path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/>',home:'<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>',settings:'<path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>',star:'<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>',heart:'<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>',share:'<path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/>',link:'<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.1 0-2-.9-2-2s.9-2 2-2h4v-1.9H7c-2.76 0-5 2.24-5 5zm7-3h4v1.9h-4V9zm3.9 6h-4v1.9h4c1.1 0 2-.9 2-2s-.9-2-2-2h-4v-1.9h4c2.76 0 5 2.24 5 5s-2.24 5-5 5z"/>',download:'<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>',upload:'<path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/>',refresh:'<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.73 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>',more_vert:'<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>',more_horiz:'<path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm8 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm8 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>',expand_more:'<path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/>',expand_less:'<path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/>',visibility:'<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>',visibility_off:'<path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.12 2.12C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.21.53-2.76 0-5-2.24-5-5 0-.8.2-1.54.53-2.21zm4.21-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/>',info:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>',warning:'<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>',error_outline:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>',help_outline:'<path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 1-2.5 3-5V8c-1.1 0-2-.9-2-2zm0 10c-.59 0-1-.51-1-1s.41-1 1-1 1 .51 1 1-.41 1-1 1z"/>',light_mode:'<path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"/>',dark_mode:'<path d="M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49zM12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"/>',view_quilt:'<path d="M3 3v8h8V3H3zm6 6H5V5h4v4zm-6 4v8h8v-8H3zm6 6H5v-4h4v4zm4-16v8h8V3h-8zm6 6h-4V5h4v4zm-6 4v8h8v-8h-8zm6 6h-4v-4h4v4z"/>',code:'<path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0L19.2 12l-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/>',toggle_on:'<path d="M6 7h12a5 5 0 010 10H6a5 5 0 010-10z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="18" cy="12" r="3"/>',swap_vert:'<path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/>',arrow_down:'<path d="M3 8l9 9 9-9H3z"/>',language:'<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/>',smart_button:'<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/>',table_chart:'<path d="M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z"/>',check_circle:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>',cancel:'<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/>',pause:'<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>',play:'<path d="M8 5v14l11-7z"/>',stop:'<path d="M6 6h12v12H6z"/>',save:'<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>',folder:'<path d="M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>',file:'<path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/>',email:'<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>',person:'<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>',lock:'<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/>',filter:'<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>',sort:'<path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/>',calendar:'<path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"/>',map:'<path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"/>',camera:'<path d="M12 12m-3.2 0a3.2 3.2 0 1 0 6.4 0a3.2 3.2 0 1 0-6.4 0M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/>',bookmark:'<path d="M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2z"/>',clock:'<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>',chat:'<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>',phone:'<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/>',notification:'<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>',cloud:'<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/>',download_done:'<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>',github:'<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>',npm:'<path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/>'};function m(t){Object.assign(u,t)}const v=(function(t,...e){return{_$luxType$:3,strings:t,values:e}})`
2
+ :host {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ width: 1em;
7
+ height: 1em;
8
+ vertical-align: middle;
9
+ fill: currentColor;
10
+ flex-shrink: 0;
11
+ }
12
+
13
+ :host([size]) {
14
+ width: var(--icon-size);
15
+ height: var(--icon-size);
16
+ }
17
+
18
+ svg {
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ `;class f extends p{static styles=v;static properties={name:{type:String,reflect:!0},size:{type:String,reflect:!0},color:{type:String,reflect:!0}};constructor(){super()}updated(){this.size&&this.style.setProperty("--icon-size",this._parseSize(this.size)),this.color&&(this.style.color=this.color);const t=this.renderRoot.querySelector(".icon-svg");t&&this.name&&u[this.name]&&(t.innerHTML=u[this.name])}_parseSize(t){return null==t?"":"number"==typeof t||/^\d+(\.\d+)?$/.test(t)?t+"px":t}render(){return this.childNodes.length>0?e`<slot></slot>`:this.name&&u[this.name]?e`<svg class="icon-svg" viewBox="0 0 24 24"></svg>`:e`<span style="font-size:0.75em;font-weight:600">${this.name||"?"}</span>`}}!function(t,e){if(!t.includes("-"))throw new Error(`Component name must contain a hyphen: ${t}`);customElements.get(t)||customElements.define(t,e)}("lux-icon",f);export{f as LuxIcon,f as default,u as icons,m as registerIcons};
@@ -0,0 +1,238 @@
1
+ var LuxInput=function(){"use strict";const e=Symbol.for("lux-nothing");function t(e,...t){return{_$luxType$:1,strings:e,values:t}}function r(e){return e&&void 0!==e._$luxType$}const s=/(?:([@.?][\w-]+)|(ref)|(class))=\s*$/;function i(t,s,i){if(s!==e&&null!=s)if(function(e){return e&&"repeat"===e._type}(s))!function(e,t){const{items:s,keyFn:i,renderFn:o}=t,n=e._repeatState;if(n)for(const e of n.entries)e.span&&e.span.parentNode&&e.span.parentNode.removeChild(e.span);const l=document.createDocumentFragment(),c=[];for(const e of s){const t=i(e),s=o(e),n=document.createElement("span");n.style.display="contents",r(s)?a(s,n):null!=s&&!1!==s&&n.appendChild(document.createTextNode(String(s))),l.appendChild(n),c.push({key:t,result:s,span:n})}e.appendChild(l),e._repeatState={entries:c}}(t,s);else if(r(s))a(s,t);else if(Array.isArray(s)){o(t);for(const e of s)if(r(e)){const r=document.createElement("span");r.style.display="contents",a(e,r),t.appendChild(r)}else e instanceof Node?t.appendChild(e):null!=e&&!1!==e&&t.appendChild(document.createTextNode(String(e)))}else{if(s instanceof Node)return o(t),void t.appendChild(s);1===t.childNodes.length&&t.firstChild.nodeType===Node.TEXT_NODE?t.firstChild.textContent=String(s):(o(t),t.appendChild(document.createTextNode(String(s))))}else o(t)}function o(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function n(t,r){const{element:s,name:i,prefix:o}=t;switch(o){case"@":{const o=t.committedValue,n=null==r||r===e,a=n&&null!=o||r?.capture!==o?.capture||r?.once!==o?.once||r?.passive!==o?.passive,l=!n&&(null==o||a);if(a&&s.removeEventListener(i,t._handler||o,o),l)if("function"==typeof r){const e=t._host||(t._host={handleEvent(e){const r=t.committedValue;if("function"==typeof r){const t=s.getRootNode().host||s;r.call(t,e)}}});t._handler=e,s.addEventListener(i,e)}else if("object"==typeof r&&r?.handleEvent){const e={handleEvent:e=>r.handleEvent.call(r,e)};t._handler=e,s.addEventListener(i,e,{capture:r.capture,once:r.once,passive:r.passive})}t.committedValue=r;break}case".":s[i]=r===e?void 0:r;break;case"?":s.toggleAttribute(i,!!r);break;case"ref":"function"==typeof r&&r(s);break;case"class":if("string"==typeof r)s.className=r;else if("object"==typeof r&&null!=r){const e=s.className||"",t=e?e.split(/\s+/):[];for(const[e,s]of Object.entries(r))if(s)t.includes(e)||t.push(e);else{const r=t.indexOf(e);-1!==r&&t.splice(r,1)}s.className=t.filter(Boolean).join(" ")}break;default:null==r||!1===r?s.removeAttribute(i):s.setAttribute(i,!0===r?"":String(r))}}function a(e,t,o){if(!r(e))return void(t.textContent=e??"");const{strings:a,values:l}=e;if(t._luxActiveParts&&t._luxStrings===a){for(const e of t._luxActiveParts)e.index<l.length&&("child"===e.type?i(e.span,l[e.index]):n(e,l[e.index]));return}const c=document.createElement("template"),u=function(e){const t=[];let r="";for(let i=0;i<e.length;i++)if(r+=e[i],i<e.length-1){const e=r.match(s);if(e){const s=e[1],o=!!e[2],n=!!e[3];let a="",l="";s?(a=s[0],l=s.slice(1)):o?(a="ref",l="ref"):n&&(a="class",l="class");const c=`lux-attr-${i}`;r=r.slice(0,-e[0].length)+`${c}="${l}" `,t.push({type:"attr",name:l,prefix:a,marker:c,index:i})}else{const e=`lux-${i}`;r+=`\x3c!--${e}--\x3e`,t.push({type:"child",marker:e,index:i})}}return{html:r,parts:t}}(a);c.innerHTML=u.html;const d=c.content.cloneNode(!0),p=[];for(const e of u.parts)if("child"===e.type){const t=document.createTreeWalker(d,NodeFilter.SHOW_COMMENT);let r;for(;r=t.nextNode();)if(r.data===e.marker){const t=document.createElement("span");t.style.display="contents",r.parentNode.replaceChild(t,r),i(t,l[e.index]),p.push({type:"child",span:t,index:e.index});break}}else{const t=d.querySelector(`[${e.marker}]`);if(t){t.removeAttribute(e.marker);const r={type:"attr",element:t,name:e.name,prefix:e.prefix,index:e.index,committedValue:void 0};n(r,l[e.index]),p.push(r)}}t.textContent="",t.appendChild(d),t._luxActiveParts=p,t._luxStrings=a}const l=new Set;let c=!1;function u(e){var t;l.add(e),c||(c=!0,t=()=>{c=!1;const e=[...l];l.clear();for(const t of e)t._$performUpdate()},Promise.resolve().then(t))}const d={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?null:JSON.stringify(e);default:return e}},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);case Object:case Array:try{return JSON.parse(e)}catch{return null}default:return e}}};class p extends HTMLElement{static properties={};static styles=void 0;static finalized=!1;static elementProperties=new Map;static __prepare(){if(this.hasOwnProperty("elementProperties"))return;const e=Object.getPrototypeOf(this);e.finalize&&e.finalize(),this.elementProperties=new Map(e.elementProperties)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap?[...this.__attributeToPropertyMap.keys()]:[]}static finalize(){if(!this.hasOwnProperty("finalized")){if(this.finalized=!0,this.__prepare(),this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of t)this.createProperty(r,e[r])}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const r=this.__attributeNameForProperty(e,t);void 0!==r&&this.__attributeToPropertyMap.set(r,e)}this.elementStyles=this.styles}}static __attributeNameForProperty(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.replace(/([A-Z])/g,"-$1").toLowerCase():void 0}static createProperty(e,t={}){if(this.__prepare(),!this.elementProperties.has(e)&&(t.state&&(t={...t,attribute:!1}),this.elementProperties.set(e,t),!t.noAccessor)){const r=Symbol(),s=this.getPropertyDescriptor(e,r,t);void 0!==s&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,r){const{type:s,reflect:i,converter:o}=r;return{get(){return this[t]},set(s){const i=this[t];this[t]=s,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static _initializers=[];static addInitializer(e){this._initializers=[...this._initializers||[],e]}static shadowRootOptions={mode:"open"};constructor(){super(),this.__updatePending=!1,this.__hasUpdated=!1,this.__controllers=new Set,this.__reflectingProperty=null,this.constructor.hasOwnProperty("finalized")||this.constructor.finalize(),this.__saveInstanceProperties(),this.requestUpdate();for(const e of this.constructor._initializers||[])e(this)}__saveInstanceProperties(){const e=this.constructor.elementProperties;if(e)for(const[t,r]of e)if(!r.noAccessor&&this.hasOwnProperty(t)){const e=this[t];delete this[t],this.__instancePropertyValues=this.__instancePropertyValues||new Map,this.__instancePropertyValues.set(t,e)}}connectedCallback(){this.__controllers.forEach(e=>e.hostConnected?.()),this.constructor.hasOwnProperty("finalized")||this.constructor.finalize();const e=this.constructor.__attributeToPropertyMap;if(e)for(const[t,r]of e){const e=this.getAttribute(t);if(null!==e){const t=this.constructor.elementProperties.get(r);if(t){const s=t.converter?.fromAttribute??d.fromAttribute;this[r]=s(e,t.type)}}}if(this.__instancePropertyValues){for(const[e,t]of this.__instancePropertyValues)this[e]=t;this.__instancePropertyValues=void 0}this.renderRoot,this.__hasUpdated||this.requestUpdate()}disconnectedCallback(){this.__controllers.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){const s=this.constructor.__attributeToPropertyMap?.get(e);if(void 0!==s&&this.__reflectingProperty!==s){const e=this.constructor.elementProperties.get(s);if(e){const t="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:d;this.__reflectingProperty=s;const i=t.fromAttribute(r,e.type);this[s]=i,this.__reflectingProperty=null}}}get renderRoot(){return this._renderRoot||(this._renderRoot=this.createRenderRoot(),this.__adoptStyles()),this._renderRoot}createRenderRoot(){return this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions)}__adoptStyles(){const e=this.constructor.elementStyles;if(!e)return;const t=Array.isArray(e)?e:[e],s=[];for(const e of t)"string"==typeof e?s.push(e):r(e)&&s.push(e.strings.join(""));if(0!==s.length)if(void 0!==this._renderRoot.adoptedStyleSheets){const e=new CSSStyleSheet;e.replaceSync(s.join("\n")),this._renderRoot.adoptedStyleSheets=[...this._renderRoot.adoptedStyleSheets,e]}else{const e=document.createElement("style");e.textContent=s.join("\n"),this._renderRoot.appendChild(e)}}enableUpdating(e){}get updateComplete(){return this.__updateCompletePromise??Promise.resolve()}get hasUpdated(){return this.__hasUpdated}get isUpdatePending(){return this.__updatePending}requestUpdate(e,t,r){if(void 0!==e){if(!(r?.hasChanged??((e,t)=>!Object.is(e,t)))(this[e],t))return}this.__updatePending||(this.__updatePending=!0,u(this))}async performUpdate(){if(this.isUpdatePending){this.__updatePending=!1,this.willUpdate(new Map),this.__controllers.forEach(e=>e.hostUpdate?.()),this.update(new Map),this.__hasUpdated=!0;for(const[e,t]of this.constructor.elementProperties)if(t.reflect){const r=this[e],s=t.converter?.toAttribute??d.toAttribute,i=this.constructor.__attributeNameForProperty(e,t);if(void 0!==i){this.__reflectingProperty=e;const o=s(r,t.type);null==o?this.removeAttribute(i):this.setAttribute(i,String(o)),this.__reflectingProperty=null}}this.__controllers.forEach(e=>e.hostUpdated?.()),this.firstUpdated(new Map),this.updated(new Map)}}_$performUpdate(){this.performUpdate()}shouldUpdate(e){return!0}willUpdate(e){}update(e){const t=this.render();t&&a(t,this.renderRoot)}render(){return t``}firstUpdated(e){}updated(e){}propertyChangedCallback(e,t,r){}addController(e){this.__controllers.add(e),this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers.delete(e)}emit(e,t,r={}){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0,...r}))}$(e){return this.renderRoot.querySelector(e)}$$(e){return this.renderRoot.querySelectorAll(e)}}const h=t`<svg viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor">
2
+ <path
3
+ d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
4
+ />
5
+ </svg>`,f=(function(e,...t){return{_$luxType$:3,strings:e,values:t}})`
6
+ :host {
7
+ display: inline-block;
8
+ width: 100%;
9
+ font-size: 13px;
10
+ vertical-align: middle;
11
+ }
12
+
13
+ .wrap {
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 0;
17
+ border: 1px solid rgb(var(--lux-border, 226 232 240));
18
+ border-radius: var(--lux-radius, 6px);
19
+ background: rgb(var(--lux-card, 255 255 255));
20
+ transition:
21
+ border-color 0.2s,
22
+ box-shadow 0.2s;
23
+ overflow: hidden;
24
+ }
25
+
26
+ .wrap:hover {
27
+ border-color: rgb(var(--lux-primary-400, 108 92 231) / 40%);
28
+ }
29
+
30
+ :host([focused]) .wrap {
31
+ border-color: rgb(var(--lux-primary-400, 108 92 231));
32
+ box-shadow: 0 0 0 2px rgb(var(--lux-primary-400, 108 92 231) / 15%);
33
+ }
34
+
35
+ :host([has-error]) .wrap {
36
+ border-color: rgb(var(--lux-error, 239 68 68));
37
+ }
38
+
39
+ :host([has-error][focused]) .wrap {
40
+ box-shadow: 0 0 0 2px rgb(var(--lux-error, 239 68 68) / 15%);
41
+ }
42
+
43
+ /* Status colors */
44
+ :host([status='success']) .wrap {
45
+ border-color: rgb(var(--lux-success, 34 197 94));
46
+ }
47
+ :host([status='success'][focused]) .wrap {
48
+ box-shadow: 0 0 0 2px rgb(var(--lux-success, 34 197 94) / 15%);
49
+ }
50
+
51
+ :host([status='info']) .wrap {
52
+ border-color: rgb(var(--lux-info, 59 130 246));
53
+ }
54
+ :host([status='info'][focused]) .wrap {
55
+ box-shadow: 0 0 0 2px rgb(var(--lux-info, 59 130 246) / 15%);
56
+ }
57
+
58
+ :host([status='warning']) .wrap {
59
+ border-color: rgb(var(--lux-warning, 234 179 8));
60
+ }
61
+ :host([status='warning'][focused]) .wrap {
62
+ box-shadow: 0 0 0 2px rgb(var(--lux-warning, 234 179 8) / 15%);
63
+ }
64
+
65
+ :host([status='error']) .wrap {
66
+ border-color: rgb(var(--lux-error, 239 68 68));
67
+ }
68
+ :host([status='error'][focused]) .wrap {
69
+ box-shadow: 0 0 0 2px rgb(var(--lux-error, 239 68 68) / 15%);
70
+ }
71
+
72
+ /* Regex invalid (when no explicit status) */
73
+ :host([regex-invalid]) .wrap {
74
+ border-color: rgb(var(--lux-error, 239 68 68));
75
+ }
76
+ :host([regex-invalid][focused]) .wrap {
77
+ box-shadow: 0 0 0 2px rgb(var(--lux-error, 239 68 68) / 15%);
78
+ }
79
+ :host([data-regex-status='success'][regex-invalid]) .wrap {
80
+ border-color: rgb(var(--lux-success, 34 197 94));
81
+ }
82
+ :host([data-regex-status='info'][regex-invalid]) .wrap {
83
+ border-color: rgb(var(--lux-info, 59 130 246));
84
+ }
85
+ :host([data-regex-status='warning'][regex-invalid]) .wrap {
86
+ border-color: rgb(var(--lux-warning, 234 179 8));
87
+ }
88
+ :host([data-regex-status='error'][regex-invalid]) .wrap,
89
+ :host([data-regex-status=''][regex-invalid]) .wrap {
90
+ border-color: rgb(var(--lux-error, 239 68 68));
91
+ }
92
+
93
+ :host([disabled]) .wrap {
94
+ opacity: 0.5;
95
+ cursor: not-allowed;
96
+ pointer-events: none;
97
+ }
98
+
99
+ .prefix,
100
+ .suffix {
101
+ display: inline-flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ flex-shrink: 0;
105
+ color: rgb(var(--lux-text, 15 23 42));
106
+ padding: 0;
107
+ font-size: inherit;
108
+ line-height: 1;
109
+ user-select: none;
110
+ }
111
+
112
+ .prefix {
113
+ padding-left: 6px;
114
+ }
115
+ .suffix {
116
+ padding-right: 6px;
117
+ }
118
+
119
+ input {
120
+ flex: 1;
121
+ min-width: 0;
122
+ border: none;
123
+ outline: none;
124
+ background: transparent;
125
+ color: rgb(var(--lux-text, 15 23 42));
126
+ font-size: inherit;
127
+ font-family: inherit;
128
+ padding: 6px 8px;
129
+ line-height: 1.5;
130
+ width: 100%;
131
+ }
132
+
133
+ input[type='number'] {
134
+ -moz-appearance: textfield;
135
+ }
136
+
137
+ input[type='number']::-webkit-inner-spin-button,
138
+ input[type='number']::-webkit-outer-spin-button {
139
+ opacity: 1;
140
+ height: auto;
141
+ }
142
+
143
+ input::placeholder {
144
+ color: rgb(var(--lux-text-muted, 148 163 184));
145
+ }
146
+
147
+ input:disabled {
148
+ cursor: not-allowed;
149
+ }
150
+
151
+ .clear-btn {
152
+ display: none;
153
+ align-items: center;
154
+ justify-content: center;
155
+ flex-shrink: 0;
156
+ width: 20px;
157
+ height: 20px;
158
+ margin-right: 8px;
159
+ border: none;
160
+ border-radius: 50%;
161
+ background: transparent;
162
+ color: rgb(var(--lux-text-muted, 148 163 184));
163
+ cursor: pointer;
164
+ padding: 0;
165
+ transition:
166
+ color 0.15s,
167
+ background 0.15s;
168
+ }
169
+
170
+ .clear-btn:hover {
171
+ color: rgb(var(--lux-text, 15 23 42));
172
+ background: rgb(var(--lux-hover, 0 0 0 / 5%));
173
+ }
174
+
175
+ :host([clearable][has-value]:hover) .clear-btn,
176
+ :host([clearable][focused]) .clear-btn {
177
+ display: inline-flex;
178
+ }
179
+
180
+ .error-msg {
181
+ display: none;
182
+ margin-top: 4px;
183
+ font-size: 12px;
184
+ color: rgb(var(--lux-error, 239 68 68));
185
+ line-height: 1.4;
186
+ }
187
+
188
+ :host([has-error]) .error-msg {
189
+ display: block;
190
+ }
191
+
192
+ /* Size: sm */
193
+ :host([size='sm']) .wrap {
194
+ border-radius: var(--lux-radius-sm, 4px);
195
+ }
196
+ :host([size='sm']) input {
197
+ padding: 4px 8px;
198
+ font-size: 12px;
199
+ }
200
+ :host([size='sm']) .prefix {
201
+ padding-left: 4px;
202
+ }
203
+ :host([size='sm']) .suffix {
204
+ padding-right: 4px;
205
+ }
206
+
207
+ /* Size: lg */
208
+ :host([size='lg']) .wrap {
209
+ border-radius: var(--lux-radius, 6px);
210
+ }
211
+ :host([size='lg']) input {
212
+ padding: 10px 12px;
213
+ font-size: 15px;
214
+ }
215
+ :host([size='lg']) .prefix {
216
+ padding-left: 10px;
217
+ }
218
+ :host([size='lg']) .suffix {
219
+ padding-right: 10px;
220
+ }
221
+ `;class g extends p{static styles=f;static properties={value:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},type:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},clearable:{type:Boolean,reflect:!0},error:{type:String,reflect:!0},size:{type:String,reflect:!0},status:{type:String,reflect:!0},regex:{type:String,reflect:!0},regexStatus:{type:String,attribute:"regex-status",reflect:!0}};constructor(){super(),this.value="",this.placeholder="",this.type="text",this.disabled=!1,this.clearable=!1,this.error="",this.status="",this.regex="",this.regexStatus="",this._onDocClickBound=!1}connectedCallback(){super.connectedCallback(),this._updateHasValue()}updated(e){e.has("value")&&(this._updateHasValue(),this._validateRegex()),e.has("error")&&(this.error?this.setAttribute("has-error",""):this.removeAttribute("has-error")),(e.has("status")||e.has("regex")||e.has("regexStatus"))&&this._validateRegex()}_updateHasValue(){this.value?this.setAttribute("has-value",""):this.removeAttribute("has-value")}_onInput(e){e.stopPropagation(),this.value=e.target.value,this._validateRegex(),this.emit("input",{value:this.value})}_onChange(e){this.value=e.target.value,this._validateRegex(),this.emit("change",{value:this.value})}_validateRegex(){if(!this.regex||this.status)return this.removeAttribute("regex-invalid"),void this.removeAttribute("data-regex-status");if(!this.value)return this.removeAttribute("regex-invalid"),void this.removeAttribute("data-regex-status");new RegExp(this.regex).test(String(this.value))?(this.removeAttribute("regex-invalid"),this.removeAttribute("data-regex-status")):(this.setAttribute("regex-invalid",""),this.setAttribute("data-regex-status",this.regexStatus||"error"))}_onFocus(){this.setAttribute("focused",""),this.emit("focus")}_onBlur(){this.removeAttribute("focused"),this.emit("blur")}_clear(){this.value="",this.removeAttribute("regex-invalid"),this.emit("input",{value:""}),this.emit("clear");const e=this.renderRoot.querySelector("input");e&&e.focus()}render(){return t`
222
+ <div class="wrap">
223
+ <slot class="prefix" name="prefix"></slot>
224
+ <input
225
+ .type=${this.type}
226
+ .value=${this.value}
227
+ .placeholder=${this.placeholder}
228
+ .disabled=${this.disabled}
229
+ @input=${e=>this._onInput(e)}
230
+ @change=${e=>this._onChange(e)}
231
+ @focus=${()=>this._onFocus()}
232
+ @blur=${()=>this._onBlur()}
233
+ />
234
+ <span class="clear-btn" @click=${this._clear}>${h}</span>
235
+ <slot class="suffix" name="suffix"></slot>
236
+ </div>
237
+ ${this.error?t`<span class="error-msg">${this.error}</span>`:""}
238
+ `}}return function(e,t){if(!e.includes("-"))throw new Error(`Component name must contain a hyphen: ${e}`);customElements.get(e)||customElements.define(e,t)}("lux-input",g),g}();