@kodaris/krubble-components 1.0.0

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 (46) hide show
  1. package/custom-elements.json +2156 -0
  2. package/dist/accordion/accordion.d.ts +35 -0
  3. package/dist/accordion/accordion.d.ts.map +1 -0
  4. package/dist/accordion/accordion.js +120 -0
  5. package/dist/accordion/accordion.js.map +1 -0
  6. package/dist/alert.d.ts +35 -0
  7. package/dist/alert.d.ts.map +1 -0
  8. package/dist/alert.js +204 -0
  9. package/dist/alert.js.map +1 -0
  10. package/dist/button/button.d.ts +30 -0
  11. package/dist/button/button.d.ts.map +1 -0
  12. package/dist/button/button.js +133 -0
  13. package/dist/button/button.js.map +1 -0
  14. package/dist/code-demo/code-demo.d.ts +44 -0
  15. package/dist/code-demo/code-demo.d.ts.map +1 -0
  16. package/dist/code-demo/code-demo.js +277 -0
  17. package/dist/code-demo/code-demo.js.map +1 -0
  18. package/dist/context-menu/context-menu.d.ts +54 -0
  19. package/dist/context-menu/context-menu.d.ts.map +1 -0
  20. package/dist/context-menu/context-menu.js +179 -0
  21. package/dist/context-menu/context-menu.js.map +1 -0
  22. package/dist/dialog/dialog.d.ts +58 -0
  23. package/dist/dialog/dialog.d.ts.map +1 -0
  24. package/dist/dialog/dialog.js +142 -0
  25. package/dist/dialog/dialog.js.map +1 -0
  26. package/dist/form/index.d.ts +2 -0
  27. package/dist/form/index.d.ts.map +1 -0
  28. package/dist/form/index.js +3 -0
  29. package/dist/form/index.js.map +1 -0
  30. package/dist/form/text-field/text-field.d.ts +91 -0
  31. package/dist/form/text-field/text-field.d.ts.map +1 -0
  32. package/dist/form/text-field/text-field.js +281 -0
  33. package/dist/form/text-field/text-field.js.map +1 -0
  34. package/dist/index.d.ts +10 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +10 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/krubble.bundled.js +1402 -0
  39. package/dist/krubble.bundled.js.map +1 -0
  40. package/dist/krubble.bundled.min.js +739 -0
  41. package/dist/krubble.bundled.min.js.map +1 -0
  42. package/dist/krubble.umd.js +1411 -0
  43. package/dist/krubble.umd.js.map +1 -0
  44. package/dist/krubble.umd.min.js +739 -0
  45. package/dist/krubble.umd.min.js.map +1 -0
  46. package/package.json +51 -0
@@ -0,0 +1,1411 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.kr = {}));
5
+ })(this, (function (exports) { 'use strict';
6
+
7
+ /**
8
+ * @license
9
+ * Copyright 2019 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+ const t$3=globalThis,e$7=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$7&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$4=t=>new n$3("string"==typeof t?t:t+"",void 0,s$2),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$2)},S$1=(s,o)=>{if(e$7)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$3.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$7?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$4(e)})(t):t;
13
+
14
+ /**
15
+ * @license
16
+ * Copyright 2017 Google LLC
17
+ * SPDX-License-Identifier: BSD-3-Clause
18
+ */const{is:i$3,defineProperty:e$6,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$3,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$3(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$6(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$3(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$2)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.1");
19
+
20
+ /**
21
+ * @license
22
+ * Copyright 2017 Google LLC
23
+ * SPDX-License-Identifier: BSD-3-Clause
24
+ */
25
+ const t$2=globalThis,i$2=t$2.trustedTypes,s$1=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$5="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$1=`<${o$3}>`,r$2=document,l$1=()=>r$2.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u$1=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m$1=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$2.createTreeWalker(r$2,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$1?s$1.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$1?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):void 0!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g:p):c===g||c===p?c=m$1:c===v||c===_?c=f$1:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$5+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$5)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$2?i$2.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$2.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$2).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r$2,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$2.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$1()),this.O(l$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t$2.litHtmlPolyfillSupport;j?.(N,R),(t$2.litHtmlVersions??=[]).push("3.3.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l$1(),t),t,void 0,s??{});}return h._$AI(t),h};
26
+
27
+ /**
28
+ * @license
29
+ * Copyright 2017 Google LLC
30
+ * SPDX-License-Identifier: BSD-3-Clause
31
+ */const s=globalThis;let i$1 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$1._$litElement$=true,i$1["finalized"]=true,s.litElementHydrateSupport?.({LitElement:i$1});const o$2=s.litElementPolyfillSupport;o$2?.({LitElement:i$1});(s.litElementVersions??=[]).push("4.2.1");
32
+
33
+ /**
34
+ * @license
35
+ * Copyright 2017 Google LLC
36
+ * SPDX-License-Identifier: BSD-3-Clause
37
+ */
38
+ const t$1=t=>(e,o)=>{ void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);};
39
+
40
+ /**
41
+ * @license
42
+ * Copyright 2017 Google LLC
43
+ * SPDX-License-Identifier: BSD-3-Clause
44
+ */const o$1={attribute:true,type:String,converter:u$2,reflect:false,hasChanged:f$2},r$1=(t=o$1,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=true),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n(t){return (e,o)=>"object"==typeof o?r$1(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
45
+
46
+ /**
47
+ * @license
48
+ * Copyright 2017 Google LLC
49
+ * SPDX-License-Identifier: BSD-3-Clause
50
+ */function r(r){return n({...r,state:true,attribute:false})}
51
+
52
+ /**
53
+ * @license
54
+ * Copyright 2017 Google LLC
55
+ * SPDX-License-Identifier: BSD-3-Clause
56
+ */
57
+ const e$4=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
58
+
59
+ /**
60
+ * @license
61
+ * Copyright 2017 Google LLC
62
+ * SPDX-License-Identifier: BSD-3-Clause
63
+ */function e$3(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;return e$4(n,s,{get(){return o(this)}})}}
64
+
65
+ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
66
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
67
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
68
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
69
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
70
+ };
71
+ /**
72
+ * Accordion component for collapsible content sections.
73
+ *
74
+ * ## Usage
75
+ * ```html
76
+ * <kr-accordion header="Basic Information" expanded>
77
+ * <div>Content here</div>
78
+ * </kr-accordion>
79
+ * ```
80
+ *
81
+ * @slot - The collapsible content
82
+ *
83
+ * @property {string} header - Section header text
84
+ * @property {boolean} expanded - Whether the accordion is expanded
85
+ */
86
+ exports.KRAccordion = class KRAccordion extends i$1 {
87
+ constructor() {
88
+ super(...arguments);
89
+ /**
90
+ * Section header text
91
+ */
92
+ this.header = '';
93
+ /**
94
+ * Whether the accordion is expanded
95
+ */
96
+ this.expanded = false;
97
+ }
98
+ toggle() {
99
+ this.expanded = !this.expanded;
100
+ }
101
+ render() {
102
+ return x `
103
+ <div class="header" @click=${this.toggle}>
104
+ <span class="header__title">${this.header}</span>
105
+ <svg class="header__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
106
+ <path d="M6 9l6 6 6-6"/>
107
+ </svg>
108
+ </div>
109
+ <div class="content">
110
+ <div class="content__inner">
111
+ <div class="content__body">
112
+ <slot></slot>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ `;
117
+ }
118
+ };
119
+ exports.KRAccordion.styles = i$4 `
120
+ :host {
121
+ display: block;
122
+ margin-bottom: 16px;
123
+ }
124
+
125
+ .header {
126
+ display: flex;
127
+ align-items: center;
128
+ justify-content: space-between;
129
+ padding: 12px 16px;
130
+ background: #f7f8f9;
131
+ border-radius: 8px;
132
+ cursor: pointer;
133
+ user-select: none;
134
+ }
135
+
136
+ .header__title {
137
+ font-size: 15px;
138
+ font-weight: 600;
139
+ color: #111827;
140
+ }
141
+
142
+ .header__icon {
143
+ width: 20px;
144
+ height: 20px;
145
+ color: #9ca3af;
146
+ transition: transform 0.2s ease;
147
+ flex-shrink: 0;
148
+ }
149
+
150
+ :host([expanded]) .header__icon {
151
+ transform: rotate(180deg);
152
+ }
153
+
154
+ .content {
155
+ display: grid;
156
+ grid-template-rows: 0fr;
157
+ transition: grid-template-rows 0.2s ease;
158
+ }
159
+
160
+ :host([expanded]) .content {
161
+ grid-template-rows: 1fr;
162
+ }
163
+
164
+ .content__inner {
165
+ overflow: hidden;
166
+ }
167
+
168
+ .content__body {
169
+ padding: 16px 16px 8px 16px;
170
+ }
171
+ `;
172
+ __decorate$6([
173
+ n({ type: String })
174
+ ], exports.KRAccordion.prototype, "header", void 0);
175
+ __decorate$6([
176
+ n({ type: Boolean, reflect: true })
177
+ ], exports.KRAccordion.prototype, "expanded", void 0);
178
+ exports.KRAccordion = __decorate$6([
179
+ t$1('kr-accordion')
180
+ ], exports.KRAccordion);
181
+
182
+ /**
183
+ * @license
184
+ * Copyright 2017 Google LLC
185
+ * SPDX-License-Identifier: BSD-3-Clause
186
+ */
187
+ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},e$2=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
188
+
189
+ /**
190
+ * @license
191
+ * Copyright 2018 Google LLC
192
+ * SPDX-License-Identifier: BSD-3-Clause
193
+ */const e$1=e$2(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
194
+
195
+ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
196
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
197
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
198
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
199
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
200
+ };
201
+ /**
202
+ * A customizable alert component for displaying important information to users.
203
+ *
204
+ * @slot - The alert message content
205
+ * @fires dismiss - Fired when the dismiss button is clicked
206
+ */
207
+ exports.KRAlert = class KRAlert extends i$1 {
208
+ constructor() {
209
+ super(...arguments);
210
+ /**
211
+ * The alert type/severity
212
+ */
213
+ this.type = 'info';
214
+ /**
215
+ * Whether the alert can be dismissed
216
+ */
217
+ this.dismissible = false;
218
+ /**
219
+ * Whether the alert is visible
220
+ */
221
+ this.visible = true;
222
+ }
223
+ /** Handles dismiss button click */
224
+ _handleDismiss() {
225
+ this.visible = false;
226
+ this.dispatchEvent(new CustomEvent('dismiss', { bubbles: true, composed: true }));
227
+ }
228
+ render() {
229
+ const icons = {
230
+ info: x `<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/></svg>`,
231
+ success: x `<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>`,
232
+ warning: x `<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg>`,
233
+ error: x `<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>`,
234
+ };
235
+ return x `
236
+ <div
237
+ class=${e$1({
238
+ 'alert': true,
239
+ ['alert--' + this.type]: true,
240
+ 'alert--hidden': !this.visible
241
+ })}
242
+ role="alert"
243
+ >
244
+ ${icons[this.type]}
245
+ <div class="content">
246
+ ${this.header
247
+ ? x `<h4 class="header">${this.header}</h4>`
248
+ : E}
249
+ <div class="message">
250
+ <slot></slot>
251
+ </div>
252
+ </div>
253
+ ${this.dismissible
254
+ ? x `
255
+ <button
256
+ class="dismiss"
257
+ type="button"
258
+ aria-label="Dismiss alert"
259
+ @click=${this._handleDismiss}
260
+ >
261
+ <svg viewBox="0 0 20 20" fill="currentColor" width="16" height="16">
262
+ <path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
263
+ </svg>
264
+ </button>
265
+ `
266
+ : E}
267
+ </div>
268
+ `;
269
+ }
270
+ };
271
+ exports.KRAlert.styles = i$4 `
272
+ :host {
273
+ display: block;
274
+ }
275
+
276
+ .alert {
277
+ display: flex;
278
+ align-items: center;
279
+ gap: 12px;
280
+ padding: 12px 16px;
281
+ border-radius: 8px;
282
+ border-left: 4px solid;
283
+ }
284
+
285
+ .alert--hidden {
286
+ display: none;
287
+ }
288
+
289
+ /* Variants */
290
+ .alert--info {
291
+ background-color: #eff6ff;
292
+ border-left-color: #3b82f6;
293
+ }
294
+
295
+ .alert--info .icon {
296
+ color: #2563eb;
297
+ }
298
+
299
+ .alert--success {
300
+ background-color: #f0fdf4;
301
+ border-left-color: #22c55e;
302
+ }
303
+
304
+ .alert--success .icon {
305
+ color: #16a34a;
306
+ }
307
+
308
+ .alert--warning {
309
+ background-color: #fffbeb;
310
+ border-left-color: #f59e0b;
311
+ }
312
+
313
+ .alert--warning .icon {
314
+ color: #d97706;
315
+ }
316
+
317
+ .alert--error {
318
+ background-color: #fef2f2;
319
+ border-left-color: #ef4444;
320
+ }
321
+
322
+ .alert--error .icon {
323
+ color: #dc2626;
324
+ }
325
+
326
+ .icon {
327
+ flex-shrink: 0;
328
+ width: 20px;
329
+ height: 20px;
330
+ }
331
+
332
+ .content {
333
+ flex: 1;
334
+ min-width: 0;
335
+ display: flex;
336
+ flex-direction: column;
337
+ gap: 6px;
338
+ }
339
+
340
+ .header {
341
+ font-size: 14px;
342
+ font-weight: 600;
343
+ color: #111827;
344
+ margin: 0;
345
+ }
346
+
347
+ .message {
348
+ font-size: 14px;
349
+ color: #374151;
350
+ margin: 0;
351
+ }
352
+
353
+ .dismiss {
354
+ flex-shrink: 0;
355
+ display: flex;
356
+ align-items: center;
357
+ justify-content: center;
358
+ width: 24px;
359
+ height: 24px;
360
+ padding: 0;
361
+ background: none;
362
+ border: none;
363
+ border-radius: 4px;
364
+ color: #6b7280;
365
+ cursor: pointer;
366
+ transition: background 0.15s ease, color 0.15s ease;
367
+ }
368
+
369
+ .dismiss:hover {
370
+ background-color: rgba(0, 0, 0, 0.05);
371
+ color: #374151;
372
+ }
373
+
374
+ .dismiss:focus-visible {
375
+ outline: 2px solid #3b82f6;
376
+ outline-offset: 2px;
377
+ }
378
+ `;
379
+ __decorate$5([
380
+ n({ type: String })
381
+ ], exports.KRAlert.prototype, "type", void 0);
382
+ __decorate$5([
383
+ n({ type: String })
384
+ ], exports.KRAlert.prototype, "header", void 0);
385
+ __decorate$5([
386
+ n({ type: Boolean })
387
+ ], exports.KRAlert.prototype, "dismissible", void 0);
388
+ __decorate$5([
389
+ n({ type: Boolean })
390
+ ], exports.KRAlert.prototype, "visible", void 0);
391
+ exports.KRAlert = __decorate$5([
392
+ t$1('kr-alert')
393
+ ], exports.KRAlert);
394
+
395
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
396
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
397
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
398
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
399
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
400
+ };
401
+ /**
402
+ * A customizable button component.
403
+ *
404
+ * @slot - The button content
405
+ * @csspart button - The button element
406
+ * @fires click - Fired when the button is clicked
407
+ */
408
+ exports.KRButton = class KRButton extends i$1 {
409
+ constructor() {
410
+ super(...arguments);
411
+ /**
412
+ * The button variant style
413
+ */
414
+ this.variant = 'primary';
415
+ /**
416
+ * The button size
417
+ */
418
+ this.size = 'medium';
419
+ /**
420
+ * Whether the button is disabled
421
+ */
422
+ this.disabled = false;
423
+ }
424
+ render() {
425
+ const sizeClass = this.size !== 'medium' ? this.size : '';
426
+ return x `
427
+ <button
428
+ part="button"
429
+ class="${this.variant} ${sizeClass}"
430
+ ?disabled=${this.disabled}
431
+ >
432
+ <slot></slot>
433
+ </button>
434
+ `;
435
+ }
436
+ };
437
+ exports.KRButton.styles = i$4 `
438
+ :host {
439
+ display: inline-block;
440
+ }
441
+
442
+ button {
443
+ font-family: inherit;
444
+ font-size: 14px;
445
+ font-weight: 400;
446
+ letter-spacing: 0.01em;
447
+ padding: 0 22px;
448
+ height: 36px;
449
+ line-height: 36px;
450
+ border: none;
451
+ border-radius: 20px;
452
+ cursor: pointer;
453
+ transition: background 0.15s ease;
454
+ }
455
+
456
+ button:active:not(:disabled) {
457
+ transform: scale(0.98);
458
+ }
459
+
460
+ button:disabled {
461
+ opacity: 0.5;
462
+ cursor: not-allowed;
463
+ }
464
+
465
+ /* Variants */
466
+ button.primary {
467
+ background: #163052;
468
+ color: white;
469
+ }
470
+
471
+ button.primary:hover:not(:disabled) {
472
+ background: #0e1f35;
473
+ }
474
+
475
+ button.secondary {
476
+ background: #f3f4f6;
477
+ color: #374151;
478
+ }
479
+
480
+ button.secondary:hover:not(:disabled) {
481
+ background: #e5e7eb;
482
+ }
483
+
484
+ button.outline {
485
+ background: transparent;
486
+ border: 1px solid #d1d5db;
487
+ color: #374151;
488
+ box-shadow: none;
489
+ }
490
+
491
+ button.outline:hover:not(:disabled) {
492
+ background: #f9fafb;
493
+ border-color: #9ca3af;
494
+ box-shadow: none;
495
+ }
496
+
497
+ /* Sizes */
498
+ button.small {
499
+ font-size: 0.75rem;
500
+ height: 28px;
501
+ line-height: 28px;
502
+ padding: 0 10px;
503
+ }
504
+
505
+ button.large {
506
+ font-size: 1rem;
507
+ height: 44px;
508
+ line-height: 44px;
509
+ padding: 0 24px;
510
+ }
511
+ `;
512
+ __decorate$4([
513
+ n({ type: String })
514
+ ], exports.KRButton.prototype, "variant", void 0);
515
+ __decorate$4([
516
+ n({ type: String })
517
+ ], exports.KRButton.prototype, "size", void 0);
518
+ __decorate$4([
519
+ n({ type: Boolean })
520
+ ], exports.KRButton.prototype, "disabled", void 0);
521
+ exports.KRButton = __decorate$4([
522
+ t$1('kr-button')
523
+ ], exports.KRButton);
524
+
525
+ /**
526
+ * @license
527
+ * Copyright 2017 Google LLC
528
+ * SPDX-License-Identifier: BSD-3-Clause
529
+ */class e extends i{constructor(i){if(super(i),this.it=E,i.type!==t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===E||null==r)return this._t=void 0,this.it=r;if(r===T)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName="unsafeHTML",e.resultType=1;const o=e$2(e);
530
+
531
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
532
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
533
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
534
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
535
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
536
+ };
537
+ /**
538
+ * Code demo component with Preview/Code tabs and syntax highlighting.
539
+ *
540
+ * Usage:
541
+ * ```html
542
+ * <kr-code-demo language="html">
543
+ * <div slot="preview">
544
+ * <kr-button>Click me</kr-button>
545
+ * </div>
546
+ * <script slot="code" type="text/plain">
547
+ * <kr-button>Click me</kr-button>
548
+ * </script>
549
+ * </kr-code-demo>
550
+ * ```
551
+ *
552
+ * Requires Prism.js to be loaded globally for syntax highlighting.
553
+ */
554
+ exports.KRCodeDemo = class KRCodeDemo extends i$1 {
555
+ constructor() {
556
+ super(...arguments);
557
+ this.language = 'html';
558
+ this.code = '';
559
+ this.activeTab = 'preview';
560
+ this.copied = false;
561
+ }
562
+ setTab(tab) {
563
+ this.activeTab = tab;
564
+ }
565
+ getHighlightedCode() {
566
+ if (!this.code)
567
+ return '';
568
+ if (window.Prism && window.Prism.languages[this.language]) {
569
+ return window.Prism.highlight(this.code, window.Prism.languages[this.language], this.language);
570
+ }
571
+ // Fallback: escape HTML and return plain text
572
+ return this.escapeHtml(this.code);
573
+ }
574
+ escapeHtml(text) {
575
+ const div = document.createElement('div');
576
+ div.textContent = text;
577
+ return div.innerHTML;
578
+ }
579
+ async copyCode() {
580
+ if (!this.code)
581
+ return;
582
+ try {
583
+ await navigator.clipboard.writeText(this.code);
584
+ this.copied = true;
585
+ setTimeout(() => {
586
+ this.copied = false;
587
+ }, 2000);
588
+ }
589
+ catch (err) {
590
+ console.error('Failed to copy code:', err);
591
+ }
592
+ }
593
+ render() {
594
+ return x `
595
+ <div class="tabs">
596
+ <button
597
+ class=${e$1({ tab: true, 'tab--active': this.activeTab === 'preview' })}
598
+ @click=${() => this.setTab('preview')}
599
+ >
600
+ Preview
601
+ </button>
602
+ <button
603
+ class=${e$1({ tab: true, 'tab--active': this.activeTab === 'code' })}
604
+ @click=${() => this.setTab('code')}
605
+ >
606
+ Code
607
+ </button>
608
+ </div>
609
+
610
+ <div class=${e$1({ panel: true, 'panel--active': this.activeTab === 'preview', preview: true })}>
611
+ <slot name="preview"></slot>
612
+ </div>
613
+
614
+ <div class=${e$1({ panel: true, 'panel--active': this.activeTab === 'code', 'code-container': true })}>
615
+ <button
616
+ class=${e$1({ 'copy-btn': true, 'copy-btn--copied': this.copied })}
617
+ @click=${this.copyCode}
618
+ >
619
+ ${this.copied ? 'Copied!' : 'Copy'}
620
+ </button>
621
+ <pre class="code"><code>${o(this.getHighlightedCode())}</code></pre>
622
+ </div>
623
+
624
+ `;
625
+ }
626
+ };
627
+ exports.KRCodeDemo.styles = i$4 `
628
+ :host {
629
+ display: block;
630
+ border: 1px solid #e9ecef;
631
+ border-radius: 8px;
632
+ overflow: hidden;
633
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
634
+ }
635
+
636
+ .tabs {
637
+ display: flex;
638
+ background: #f8f9fa;
639
+ border-bottom: 1px solid #e9ecef;
640
+ }
641
+
642
+ .tab {
643
+ padding: 10px 20px;
644
+ background: none;
645
+ border: none;
646
+ color: #6c757d;
647
+ font-size: 14px;
648
+ font-weight: 500;
649
+ font-family: inherit;
650
+ cursor: pointer;
651
+ position: relative;
652
+ transition: color 0.15s;
653
+ }
654
+
655
+ .tab:hover {
656
+ color: #495057;
657
+ }
658
+
659
+ .tab--active {
660
+ color: #1a1a2e;
661
+ }
662
+
663
+ .tab--active::after {
664
+ content: '';
665
+ position: absolute;
666
+ bottom: -1px;
667
+ left: 0;
668
+ right: 0;
669
+ height: 2px;
670
+ background: #4f46e5;
671
+ }
672
+
673
+ .panel {
674
+ display: none;
675
+ }
676
+
677
+ .panel--active {
678
+ display: block;
679
+ }
680
+
681
+ .preview {
682
+ padding: 24px;
683
+ background: #ffffff;
684
+ }
685
+
686
+ .code-container {
687
+ position: relative;
688
+ }
689
+
690
+ .code {
691
+ margin: 0;
692
+ padding: 20px;
693
+ background: #1e1e2e;
694
+ overflow-x: auto;
695
+ font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
696
+ font-size: 13px;
697
+ line-height: 1.6;
698
+ color: #cdd6f4;
699
+ }
700
+
701
+ .code code {
702
+ font-family: inherit;
703
+ }
704
+
705
+ .copy-btn {
706
+ position: absolute;
707
+ top: 12px;
708
+ right: 12px;
709
+ padding: 6px 12px;
710
+ background: rgba(255, 255, 255, 0.1);
711
+ border: 1px solid rgba(255, 255, 255, 0.1);
712
+ border-radius: 6px;
713
+ color: rgba(255, 255, 255, 0.7);
714
+ font-size: 12px;
715
+ font-family: inherit;
716
+ cursor: pointer;
717
+ transition: background 0.15s, color 0.15s;
718
+ }
719
+
720
+ .copy-btn:hover {
721
+ background: rgba(255, 255, 255, 0.15);
722
+ color: white;
723
+ }
724
+
725
+ .copy-btn--copied {
726
+ background: rgba(34, 197, 94, 0.2);
727
+ border-color: rgba(34, 197, 94, 0.3);
728
+ color: #4ade80;
729
+ }
730
+
731
+ /* Prism.js theme overrides for dark mode */
732
+ .code .token.comment,
733
+ .code .token.prolog,
734
+ .code .token.doctype,
735
+ .code .token.cdata {
736
+ color: #6c7086;
737
+ }
738
+
739
+ .code .token.punctuation {
740
+ color: #9399b2;
741
+ }
742
+
743
+ .code .token.property,
744
+ .code .token.tag,
745
+ .code .token.boolean,
746
+ .code .token.number,
747
+ .code .token.constant,
748
+ .code .token.symbol,
749
+ .code .token.deleted {
750
+ color: #f38ba8;
751
+ }
752
+
753
+ .code .token.selector,
754
+ .code .token.attr-name,
755
+ .code .token.string,
756
+ .code .token.char,
757
+ .code .token.builtin,
758
+ .code .token.inserted {
759
+ color: #a6e3a1;
760
+ }
761
+
762
+ .code .token.operator,
763
+ .code .token.entity,
764
+ .code .token.url,
765
+ .code .language-css .token.string,
766
+ .code .style .token.string {
767
+ color: #94e2d5;
768
+ }
769
+
770
+ .code .token.atrule,
771
+ .code .token.attr-value,
772
+ .code .token.keyword {
773
+ color: #cba6f7;
774
+ }
775
+
776
+ .code .token.function,
777
+ .code .token.class-name {
778
+ color: #89b4fa;
779
+ }
780
+
781
+ .code .token.regex,
782
+ .code .token.important,
783
+ .code .token.variable {
784
+ color: #fab387;
785
+ }
786
+ `;
787
+ __decorate$3([
788
+ n({ type: String })
789
+ ], exports.KRCodeDemo.prototype, "language", void 0);
790
+ __decorate$3([
791
+ n({ type: String })
792
+ ], exports.KRCodeDemo.prototype, "code", void 0);
793
+ __decorate$3([
794
+ r()
795
+ ], exports.KRCodeDemo.prototype, "activeTab", void 0);
796
+ __decorate$3([
797
+ r()
798
+ ], exports.KRCodeDemo.prototype, "copied", void 0);
799
+ exports.KRCodeDemo = __decorate$3([
800
+ t$1('kr-code-demo')
801
+ ], exports.KRCodeDemo);
802
+
803
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
804
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
805
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
806
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
807
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
808
+ };
809
+ /**
810
+ * Context menu component that can be opened programmatically.
811
+ *
812
+ * Usage:
813
+ * ```ts
814
+ * const result = await ContextMenu.open({
815
+ * x: event.clientX,
816
+ * y: event.clientY,
817
+ * items: [
818
+ * { id: 'edit', label: 'Edit Item' },
819
+ * { id: 'divider', label: '', divider: true },
820
+ * { id: 'add-above', label: 'Add Item Above' },
821
+ * { id: 'add-below', label: 'Add Item Below' },
822
+ * ]
823
+ * });
824
+ *
825
+ * if (result) {
826
+ * console.log('Selected:', result.id);
827
+ * }
828
+ * ```
829
+ */
830
+ exports.KRContextMenu = class KRContextMenu extends i$1 {
831
+ constructor() {
832
+ super(...arguments);
833
+ this.items = [];
834
+ this.resolvePromise = null;
835
+ this.boundHandleOutsideClick = this.handleOutsideClick.bind(this);
836
+ this.boundHandleKeyDown = this.handleKeyDown.bind(this);
837
+ }
838
+ static async open(options) {
839
+ // Remove any existing context menu
840
+ const existing = document.querySelector('kr-context-menu');
841
+ if (existing) {
842
+ existing.remove();
843
+ }
844
+ // Create and position the menu
845
+ const menu = document.createElement('kr-context-menu');
846
+ document.body.appendChild(menu);
847
+ return menu.show(options);
848
+ }
849
+ async show(options) {
850
+ this.items = options.items;
851
+ this.style.left = `${options.x}px`;
852
+ this.style.top = `${options.y}px`;
853
+ // Adjust position if menu would go off screen
854
+ await this.updateComplete;
855
+ const rect = this.getBoundingClientRect();
856
+ if (rect.right > window.innerWidth) {
857
+ this.style.left = `${options.x - rect.width}px`;
858
+ }
859
+ if (rect.bottom > window.innerHeight) {
860
+ this.style.top = `${options.y - rect.height}px`;
861
+ }
862
+ // Add event listeners after a microtask to avoid the current event triggering close
863
+ requestAnimationFrame(() => {
864
+ document.addEventListener('click', this.boundHandleOutsideClick);
865
+ document.addEventListener('contextmenu', this.boundHandleOutsideClick);
866
+ document.addEventListener('keydown', this.boundHandleKeyDown);
867
+ });
868
+ return new Promise((resolve) => {
869
+ this.resolvePromise = resolve;
870
+ });
871
+ }
872
+ handleOutsideClick(e) {
873
+ if (!this.contains(e.target)) {
874
+ this.close(null);
875
+ }
876
+ }
877
+ handleKeyDown(e) {
878
+ if (e.key === 'Escape') {
879
+ this.close(null);
880
+ }
881
+ }
882
+ handleItemClick(item) {
883
+ if (!item.disabled && !item.divider) {
884
+ this.close(item);
885
+ }
886
+ }
887
+ close(result) {
888
+ document.removeEventListener('click', this.boundHandleOutsideClick);
889
+ document.removeEventListener('contextmenu', this.boundHandleOutsideClick);
890
+ document.removeEventListener('keydown', this.boundHandleKeyDown);
891
+ if (this.resolvePromise) {
892
+ this.resolvePromise(result);
893
+ this.resolvePromise = null;
894
+ }
895
+ this.remove();
896
+ }
897
+ render() {
898
+ return x `
899
+ <div class="menu">
900
+ ${this.items.map(item => item.divider
901
+ ? x `<div class="menu__divider"></div>`
902
+ : x `
903
+ <button
904
+ class="menu__item"
905
+ ?disabled=${item.disabled}
906
+ @click=${() => this.handleItemClick(item)}
907
+ >
908
+ ${item.icon ? x `<span class="menu__item-icon">${item.icon}</span>` : null}
909
+ ${item.label}
910
+ </button>
911
+ `)}
912
+ </div>
913
+ `;
914
+ }
915
+ };
916
+ exports.KRContextMenu.styles = i$4 `
917
+ :host {
918
+ position: fixed;
919
+ z-index: 10000;
920
+ }
921
+
922
+ .menu {
923
+ background: #1a1a2e;
924
+ border: 1px solid rgba(255, 255, 255, 0.1);
925
+ border-radius: 8px;
926
+ padding: 4px;
927
+ min-width: 180px;
928
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
929
+ }
930
+
931
+ .menu__item {
932
+ display: flex;
933
+ align-items: center;
934
+ gap: 12px;
935
+ width: 100%;
936
+ padding: 10px 12px;
937
+ background: none;
938
+ border: none;
939
+ color: rgba(255, 255, 255, 0.8);
940
+ font-size: 13px;
941
+ font-family: inherit;
942
+ text-align: left;
943
+ cursor: pointer;
944
+ border-radius: 6px;
945
+ transition: background 0.15s ease;
946
+ }
947
+
948
+ .menu__item:hover:not(:disabled) {
949
+ background: rgba(255, 255, 255, 0.05);
950
+ color: #ffffff;
951
+ }
952
+
953
+ .menu__item:disabled {
954
+ opacity: 0.5;
955
+ cursor: not-allowed;
956
+ }
957
+
958
+ .menu__item-icon {
959
+ width: 16px;
960
+ height: 16px;
961
+ display: flex;
962
+ align-items: center;
963
+ justify-content: center;
964
+ }
965
+
966
+ .menu__divider {
967
+ height: 1px;
968
+ background: rgba(255, 255, 255, 0.1);
969
+ margin: 4px 0;
970
+ }
971
+ `;
972
+ __decorate$2([
973
+ r()
974
+ ], exports.KRContextMenu.prototype, "items", void 0);
975
+ exports.KRContextMenu = __decorate$2([
976
+ t$1('kr-context-menu')
977
+ ], exports.KRContextMenu);
978
+
979
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
980
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
981
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
982
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
983
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
984
+ };
985
+ class DialogRef {
986
+ constructor() {
987
+ this.resolvePromise = null;
988
+ this.dialogElement = null;
989
+ this.promise = new Promise((resolve) => {
990
+ this.resolvePromise = resolve;
991
+ });
992
+ }
993
+ /** @internal */
994
+ setDialogElement(el) {
995
+ this.dialogElement = el;
996
+ }
997
+ close(result) {
998
+ if (this.resolvePromise) {
999
+ this.resolvePromise(result);
1000
+ this.resolvePromise = null;
1001
+ }
1002
+ this.dialogElement?.remove();
1003
+ }
1004
+ afterClosed() {
1005
+ return this.promise;
1006
+ }
1007
+ }
1008
+ /**
1009
+ * Generic dialog component that renders a Lit component inside a dialog shell.
1010
+ *
1011
+ * Usage:
1012
+ * ```ts
1013
+ * // Define your dialog content component
1014
+ * class EditItemDialog extends LitElement {
1015
+ * // Injected by KRDialog
1016
+ * dialogRef: DialogRef<{ label: string }>;
1017
+ * data: { label: string };
1018
+ *
1019
+ * save() {
1020
+ * this.dialogRef.close({ label: this.label });
1021
+ * }
1022
+ * }
1023
+ *
1024
+ * // Open the dialog
1025
+ * const dialogRef = KRDialog.open(EditItemDialog, {
1026
+ * data: { label: 'Dashboard' }
1027
+ * });
1028
+ *
1029
+ * const result = await dialogRef.afterClosed();
1030
+ * if (result) {
1031
+ * console.log('Saved:', result.label);
1032
+ * }
1033
+ * ```
1034
+ */
1035
+ exports.KRDialog = class KRDialog extends i$1 {
1036
+ constructor() {
1037
+ super(...arguments);
1038
+ this.contentElement = null;
1039
+ this.dialogRef = null;
1040
+ this.boundHandleKeyDown = this.handleKeyDown.bind(this);
1041
+ }
1042
+ static open(component, config) {
1043
+ const existing = document.querySelector('kr-dialog');
1044
+ if (existing) {
1045
+ existing.remove();
1046
+ }
1047
+ const dialogRef = new DialogRef();
1048
+ const dialog = document.createElement('kr-dialog');
1049
+ dialogRef.setDialogElement(dialog);
1050
+ dialog.dialogRef = dialogRef;
1051
+ // Create the content component
1052
+ const content = new component();
1053
+ content.dialogRef = dialogRef;
1054
+ if (config?.data) {
1055
+ content.data = config.data;
1056
+ }
1057
+ dialog.contentElement = content;
1058
+ document.body.appendChild(dialog);
1059
+ document.addEventListener('keydown', dialog.boundHandleKeyDown);
1060
+ return dialogRef;
1061
+ }
1062
+ handleKeyDown(e) {
1063
+ if (e.key === 'Escape') {
1064
+ this.dialogRef?.close(undefined);
1065
+ }
1066
+ }
1067
+ handleBackdropClick(e) {
1068
+ if (e.target.classList.contains('backdrop')) {
1069
+ this.dialogRef?.close(undefined);
1070
+ }
1071
+ }
1072
+ disconnectedCallback() {
1073
+ super.disconnectedCallback();
1074
+ document.removeEventListener('keydown', this.boundHandleKeyDown);
1075
+ }
1076
+ render() {
1077
+ return x `
1078
+ <div class="backdrop" @click=${this.handleBackdropClick}></div>
1079
+ <div class="dialog">
1080
+ ${this.contentElement}
1081
+ </div>
1082
+ `;
1083
+ }
1084
+ };
1085
+ exports.KRDialog.styles = i$4 `
1086
+ :host {
1087
+ position: fixed;
1088
+ inset: 0;
1089
+ z-index: 10000;
1090
+ display: flex;
1091
+ align-items: center;
1092
+ justify-content: center;
1093
+ }
1094
+
1095
+ .backdrop {
1096
+ position: absolute;
1097
+ inset: 0;
1098
+ background: rgba(0, 0, 0, 0.5);
1099
+ }
1100
+
1101
+ .dialog {
1102
+ position: relative;
1103
+ background: #1a1a2e;
1104
+ border: 1px solid rgba(255, 255, 255, 0.1);
1105
+ border-radius: 12px;
1106
+ box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
1107
+ max-height: 90vh;
1108
+ overflow: auto;
1109
+ }
1110
+ `;
1111
+ __decorate$1([
1112
+ r()
1113
+ ], exports.KRDialog.prototype, "contentElement", void 0);
1114
+ exports.KRDialog = __decorate$1([
1115
+ t$1('kr-dialog')
1116
+ ], exports.KRDialog);
1117
+
1118
+ /**
1119
+ * @license
1120
+ * Copyright 2020 Google LLC
1121
+ * SPDX-License-Identifier: BSD-3-Clause
1122
+ */const f=o=>void 0===o.strings,u={},m=(o,t=u)=>o._$AH=t;
1123
+
1124
+ /**
1125
+ * @license
1126
+ * Copyright 2020 Google LLC
1127
+ * SPDX-License-Identifier: BSD-3-Clause
1128
+ */const l=e$2(class extends i{constructor(r){if(super(r),r.type!==t.PROPERTY&&r.type!==t.ATTRIBUTE&&r.type!==t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!f(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(i,[t$1]){if(t$1===T||t$1===E)return t$1;const o=i.element,l=i.name;if(i.type===t.PROPERTY){if(t$1===o[l])return T}else if(i.type===t.BOOLEAN_ATTRIBUTE){if(!!t$1===o.hasAttribute(l))return T}else if(i.type===t.ATTRIBUTE&&o.getAttribute(l)===t$1+"")return T;return m(i),t$1}});
1129
+
1130
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1131
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1132
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1133
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1134
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1135
+ };
1136
+ /**
1137
+ * A text field component that works with native browser forms.
1138
+ *
1139
+ * Uses ElementInternals for form association, allowing the component
1140
+ * to participate in form submission, validation, and reset.
1141
+ *
1142
+ * Native input and change events bubble up from the inner input element.
1143
+ */
1144
+ exports.KRTextField = class KRTextField extends i$1 {
1145
+ constructor() {
1146
+ super();
1147
+ /**
1148
+ * The input label text
1149
+ */
1150
+ this.label = '';
1151
+ /**
1152
+ * The input name for form submission
1153
+ */
1154
+ this.name = '';
1155
+ /**
1156
+ * The current value
1157
+ */
1158
+ this.value = '';
1159
+ /**
1160
+ * Placeholder text
1161
+ */
1162
+ this.placeholder = '';
1163
+ /**
1164
+ * Input type (text, email, password, tel, url, search)
1165
+ */
1166
+ this.type = 'text';
1167
+ /**
1168
+ * Whether the field is required
1169
+ */
1170
+ this.required = false;
1171
+ /**
1172
+ * Whether the field is disabled
1173
+ */
1174
+ this.disabled = false;
1175
+ /**
1176
+ * Whether the field is readonly
1177
+ */
1178
+ this.readonly = false;
1179
+ /**
1180
+ * Autocomplete attribute value
1181
+ */
1182
+ this.autocomplete = '';
1183
+ /**
1184
+ * Helper text shown below the input
1185
+ */
1186
+ this.hint = '';
1187
+ this._touched = false;
1188
+ this._dirty = false;
1189
+ this._internals = this.attachInternals();
1190
+ }
1191
+ // Form-associated custom element callbacks
1192
+ get form() {
1193
+ return this._internals.form;
1194
+ }
1195
+ get validity() {
1196
+ return this._internals.validity;
1197
+ }
1198
+ get validationMessage() {
1199
+ return this._internals.validationMessage;
1200
+ }
1201
+ get willValidate() {
1202
+ return this._internals.willValidate;
1203
+ }
1204
+ checkValidity() {
1205
+ return this._internals.checkValidity();
1206
+ }
1207
+ reportValidity() {
1208
+ return this._internals.reportValidity();
1209
+ }
1210
+ formResetCallback() {
1211
+ this.value = '';
1212
+ this._touched = false;
1213
+ this._dirty = false;
1214
+ this._internals.setFormValue('');
1215
+ this._internals.setValidity({});
1216
+ }
1217
+ formStateRestoreCallback(state) {
1218
+ this.value = state;
1219
+ }
1220
+ _handleInput(e) {
1221
+ this.value = e.target.value;
1222
+ this._dirty = true;
1223
+ this._internals.setFormValue(this.value);
1224
+ this._internals.setValidity(this._input.validity, this._input.validationMessage, this._input);
1225
+ }
1226
+ _handleChange(e) {
1227
+ this.value = e.target.value;
1228
+ this._internals.setFormValue(this.value);
1229
+ }
1230
+ _handleBlur() {
1231
+ this._touched = true;
1232
+ this._internals.setValidity(this._input.validity, this._input.validationMessage, this._input);
1233
+ }
1234
+ render() {
1235
+ let validationMessage = '';
1236
+ if (this._touched && this._input && !this._input.validity.valid) {
1237
+ validationMessage = this._input.validationMessage;
1238
+ }
1239
+ return x `
1240
+ <div class="wrapper">
1241
+ ${this.label
1242
+ ? x `
1243
+ <label for="input">
1244
+ ${this.label}
1245
+ ${this.required ? x `<span class="required" aria-hidden="true">*</span>` : ''}
1246
+ </label>
1247
+ `
1248
+ : ''}
1249
+ <input
1250
+ id="input"
1251
+ type=${this.type}
1252
+ name=${this.name}
1253
+ .value=${l(this.value)}
1254
+ placeholder=${this.placeholder}
1255
+ ?required=${this.required}
1256
+ ?disabled=${this.disabled}
1257
+ ?readonly=${this.readonly}
1258
+ minlength=${this.minlength ?? ''}
1259
+ maxlength=${this.maxlength ?? ''}
1260
+ pattern=${this.pattern ?? ''}
1261
+ autocomplete=${this.autocomplete}
1262
+ @input=${this._handleInput}
1263
+ @change=${this._handleChange}
1264
+ @blur=${this._handleBlur}
1265
+ />
1266
+ ${validationMessage
1267
+ ? x `<div class="validation-message">${validationMessage}</div>`
1268
+ : this.hint
1269
+ ? x `<div class="hint">${this.hint}</div>`
1270
+ : ''}
1271
+ </div>
1272
+ `;
1273
+ }
1274
+ // Public methods for programmatic control
1275
+ focus() {
1276
+ this._input?.focus();
1277
+ }
1278
+ blur() {
1279
+ this._input?.blur();
1280
+ }
1281
+ select() {
1282
+ this._input?.select();
1283
+ }
1284
+ };
1285
+ exports.KRTextField.styles = i$4 `
1286
+ :host {
1287
+ display: block;
1288
+ font-family: inherit;
1289
+ }
1290
+
1291
+ .wrapper {
1292
+ display: flex;
1293
+ flex-direction: column;
1294
+ gap: 0.25rem;
1295
+ }
1296
+
1297
+ label {
1298
+ font-size: 13px;
1299
+ font-weight: 500;
1300
+ color: var(--kr-text-field-label-color, #374151);
1301
+ }
1302
+
1303
+ .required {
1304
+ color: var(--kr-text-field-required-color, #ef4444);
1305
+ margin-left: 0.125rem;
1306
+ }
1307
+
1308
+ input {
1309
+ font-family: inherit;
1310
+ font-size: 14px;
1311
+ padding: 0.5rem 0.75rem;
1312
+ border: 1px solid var(--kr-text-field-border-color, #d1d5db);
1313
+ border-radius: 4px;
1314
+ background-color: var(--kr-text-field-bg, #fff);
1315
+ color: var(--kr-text-field-color, #111827);
1316
+ transition: border-color 0.2s, box-shadow 0.2s;
1317
+ }
1318
+
1319
+ input:focus {
1320
+ outline: none;
1321
+ border-color: var(--kr-text-field-focus-border-color, #2563eb);
1322
+ box-shadow: 0 0 0 3px var(--kr-text-field-focus-ring-color, rgba(37, 99, 235, 0.1));
1323
+ }
1324
+
1325
+ input:disabled {
1326
+ background-color: var(--kr-text-field-disabled-bg, #f3f4f6);
1327
+ color: var(--kr-text-field-disabled-color, #9ca3af);
1328
+ cursor: not-allowed;
1329
+ }
1330
+
1331
+ input::placeholder {
1332
+ color: var(--kr-text-field-placeholder-color, #9ca3af);
1333
+ }
1334
+
1335
+ :host(:invalid) input {
1336
+ border-color: var(--kr-text-field-error-border-color, #ef4444);
1337
+ }
1338
+
1339
+ :host(:invalid) input:focus {
1340
+ box-shadow: 0 0 0 3px var(--kr-text-field-error-ring-color, rgba(239, 68, 68, 0.1));
1341
+ }
1342
+
1343
+ .validation-message {
1344
+ font-size: 0.75rem;
1345
+ color: var(--kr-text-field-error-color, #ef4444);
1346
+ }
1347
+
1348
+ .hint {
1349
+ font-size: 0.75rem;
1350
+ color: var(--kr-text-field-helper-color, #6b7280);
1351
+ }
1352
+ `;
1353
+ // Enable form association
1354
+ exports.KRTextField.formAssociated = true;
1355
+ __decorate([
1356
+ n({ type: String })
1357
+ ], exports.KRTextField.prototype, "label", void 0);
1358
+ __decorate([
1359
+ n({ type: String })
1360
+ ], exports.KRTextField.prototype, "name", void 0);
1361
+ __decorate([
1362
+ n({ type: String })
1363
+ ], exports.KRTextField.prototype, "value", void 0);
1364
+ __decorate([
1365
+ n({ type: String })
1366
+ ], exports.KRTextField.prototype, "placeholder", void 0);
1367
+ __decorate([
1368
+ n({ type: String })
1369
+ ], exports.KRTextField.prototype, "type", void 0);
1370
+ __decorate([
1371
+ n({ type: Boolean })
1372
+ ], exports.KRTextField.prototype, "required", void 0);
1373
+ __decorate([
1374
+ n({ type: Boolean })
1375
+ ], exports.KRTextField.prototype, "disabled", void 0);
1376
+ __decorate([
1377
+ n({ type: Boolean })
1378
+ ], exports.KRTextField.prototype, "readonly", void 0);
1379
+ __decorate([
1380
+ n({ type: Number })
1381
+ ], exports.KRTextField.prototype, "minlength", void 0);
1382
+ __decorate([
1383
+ n({ type: Number })
1384
+ ], exports.KRTextField.prototype, "maxlength", void 0);
1385
+ __decorate([
1386
+ n({ type: String })
1387
+ ], exports.KRTextField.prototype, "pattern", void 0);
1388
+ __decorate([
1389
+ n({ type: String })
1390
+ ], exports.KRTextField.prototype, "autocomplete", void 0);
1391
+ __decorate([
1392
+ n({ type: String })
1393
+ ], exports.KRTextField.prototype, "hint", void 0);
1394
+ __decorate([
1395
+ e$3('input')
1396
+ ], exports.KRTextField.prototype, "_input", void 0);
1397
+ __decorate([
1398
+ r()
1399
+ ], exports.KRTextField.prototype, "_touched", void 0);
1400
+ __decorate([
1401
+ r()
1402
+ ], exports.KRTextField.prototype, "_dirty", void 0);
1403
+ exports.KRTextField = __decorate([
1404
+ t$1('kr-text-field')
1405
+ ], exports.KRTextField);
1406
+
1407
+ exports.DialogRef = DialogRef;
1408
+
1409
+ }));
1410
+ (function(e){Object.keys(e).forEach(function(k){if(k.startsWith('KR')&&typeof e[k]==='function'){e[k.slice(2)]=e[k];delete e[k];}});})(kr);
1411
+ //# sourceMappingURL=krubble.umd.js.map