@logosphere-ui/core 0.0.0-alpha.5 → 0.0.0-alpha.7

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 (67) hide show
  1. package/dist/index.js +3207 -32
  2. package/package.json +16 -31
  3. package/dist/badge-BbhaO73N.cjs +0 -13
  4. package/dist/badge-DE7Tgd8Z.js +0 -71
  5. package/dist/badge.cjs +0 -1
  6. package/dist/badge.js +0 -4
  7. package/dist/breadcrumb-B-4yqoJZ.js +0 -41
  8. package/dist/breadcrumb-Cop-B1J7.cjs +0 -12
  9. package/dist/breadcrumb.cjs +0 -1
  10. package/dist/breadcrumb.js +0 -4
  11. package/dist/button-C1EwOosO.js +0 -58
  12. package/dist/button-CDRccsk9.cjs +0 -10
  13. package/dist/button.cjs +0 -1
  14. package/dist/button.js +0 -4
  15. package/dist/card-CUhlTJyJ.js +0 -97
  16. package/dist/card-n8ka8Zk-.cjs +0 -43
  17. package/dist/card.cjs +0 -1
  18. package/dist/card.js +0 -4
  19. package/dist/chatbot-Da_itUdJ.cjs +0 -160
  20. package/dist/chatbot-zkxngMRH.js +0 -481
  21. package/dist/chatbot.cjs +0 -1
  22. package/dist/chatbot.js +0 -4
  23. package/dist/checkbox-7Rb3WKGx.js +0 -119
  24. package/dist/checkbox-CdDTRdKV.cjs +0 -37
  25. package/dist/checkbox.cjs +0 -1
  26. package/dist/checkbox.js +0 -4
  27. package/dist/combobox-BJbI-Tgi.js +0 -268
  28. package/dist/combobox-pmE7bgEL.cjs +0 -99
  29. package/dist/combobox.cjs +0 -1
  30. package/dist/combobox.js +0 -4
  31. package/dist/datepicker-DFJx45C-.js +0 -750
  32. package/dist/datepicker-b9JGTTMx.cjs +0 -115
  33. package/dist/datepicker.cjs +0 -1
  34. package/dist/datepicker.js +0 -4
  35. package/dist/download-manager-A4fOxGWJ.js +0 -381
  36. package/dist/download-manager-BSIMTGaK.cjs +0 -97
  37. package/dist/download-manager.cjs +0 -1
  38. package/dist/download-manager.js +0 -4
  39. package/dist/formfield-D_7NFFoe.cjs +0 -27
  40. package/dist/formfield-d8fp9FTV.js +0 -118
  41. package/dist/formfield.cjs +0 -1
  42. package/dist/formfield.js +0 -4
  43. package/dist/index.cjs +0 -1
  44. package/dist/input-BcnI1w3_.cjs +0 -46
  45. package/dist/input-Bj_7u8Iv.js +0 -192
  46. package/dist/input.cjs +0 -1
  47. package/dist/input.js +0 -4
  48. package/dist/modal-Bfc6WQSL.js +0 -110
  49. package/dist/modal-DQ8VFL-P.cjs +0 -39
  50. package/dist/modal.cjs +0 -1
  51. package/dist/modal.js +0 -4
  52. package/dist/popover-B7tCqk3R.js +0 -140
  53. package/dist/popover-C2p5Pmts.cjs +0 -30
  54. package/dist/popover.cjs +0 -1
  55. package/dist/popover.js +0 -4
  56. package/dist/switch-Cpl53nRW.js +0 -64
  57. package/dist/switch-Rnnn10bn.cjs +0 -17
  58. package/dist/switch.cjs +0 -1
  59. package/dist/switch.js +0 -4
  60. package/dist/tab-BKdN4xAz.js +0 -176
  61. package/dist/tab-DcjAlXzU.cjs +0 -40
  62. package/dist/tab.cjs +0 -1
  63. package/dist/tab.js +0 -4
  64. package/dist/text-area-BkHdLnZj.cjs +0 -44
  65. package/dist/text-area-CC24lj8v.js +0 -204
  66. package/dist/textarea.cjs +0 -1
  67. package/dist/textarea.js +0 -4
@@ -1,40 +0,0 @@
1
- "use strict";const s=require("lit"),n=require("lit/decorators.js"),c=".tab{width:100%;font-family:var(--font-family-base)}.tab__list{display:flex;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid var(--color-border);scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.tab__list::-webkit-scrollbar{display:none}.tab__button{display:inline-flex;flex-direction:row;align-items:center;gap:var(--spacing-2);padding:var(--spacing-3) var(--spacing-4);min-width:120px;position:relative;cursor:pointer;border:none;border-bottom:2px solid transparent;background:transparent;font-family:var(--font-family-base);white-space:nowrap;transition:background-color var(--transition-speed-base) var(--transition-timing),border-color var(--transition-speed-base) var(--transition-timing)}.tab__button:hover:not(.tab__button--disabled):not(.tab__button--active){background-color:var(--color-tertiary-bg)}.tab__button--active{border-bottom-color:var(--color-primary)}.tab__button--disabled{cursor:not-allowed;opacity:.4;pointer-events:none}.tab__icon{font-size:var(--font-size-xl);flex-shrink:0;color:inherit;line-height:1}.tab__content{display:flex;flex-direction:column;align-items:flex-start}.tab__label{font-weight:var(--font-weight-medium);font-size:var(--font-size-sm);color:var(--color-body-text)}.tab__label--inactive{color:var(--color-tertiary)}.tab__description{font-size:var(--font-size-xs);text-align:left;color:var(--color-tertiary)}.tab__description--active{color:var(--color-secondary)}.tab__panel{padding:var(--spacing-4);outline:none}.tab__panel--hidden{display:none}";var h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,r=(d,e,a,t)=>{for(var i=t>1?void 0:t?p(e,a):e,o=d.length-1,l;o>=0;o--)(l=d[o])&&(i=(t?l(e,a,i):l(i))||i);return t&&i&&h(e,a,i),i};exports.LogosphereTab=class extends s.LitElement{constructor(){super(...arguments),this.tabs=[],this.activeTab="",this.lazy=!0,this.variant="default",this._focusedIndex=0,this._renderedTabs=new Set}connectedCallback(){super.connectedCallback(),!this.activeTab&&this.tabs.length>0&&(this.activeTab=this.tabs[0].id)}willUpdate(e){if(super.willUpdate(e),e.has("activeTab")&&this.activeTab){this._renderedTabs.add(this.activeTab);const a=this.tabs.findIndex(t=>t.id===this.activeTab);a!==-1&&(this._focusedIndex=a)}e.has("tabs")&&this.tabs.length>0&&(this.tabs.some(t=>t.id===this.activeTab)||(this.activeTab=this.tabs[0].id),this._focusedIndex=this.tabs.findIndex(t=>t.id===this.activeTab))}handleTabClick(e,a){if(a)return;const t=this.activeTab;this.activeTab=e,this._focusedIndex=this.tabs.findIndex(i=>i.id===e),this.dispatchEvent(new CustomEvent("tab-change",{detail:{oldTab:t,newTab:e},bubbles:!0,composed:!0}))}handleKeyDown(e){const{tabs:a}=this;if(a.filter(o=>!o.disabled).length===0)return;let t=this._focusedIndex;const i=this._focusedIndex;switch(e.key){case"ArrowLeft":e.preventDefault();do t=t>0?t-1:a.length-1;while(a[t]?.disabled&&t!==i);break;case"ArrowRight":e.preventDefault();do t=t<a.length-1?t+1:0;while(a[t]?.disabled&&t!==i);break;case"Home":for(e.preventDefault(),t=0;a[t]?.disabled&&t<a.length-1;)t++;break;case"End":for(e.preventDefault(),t=a.length-1;a[t]?.disabled&&t>0;)t--;break;default:return}if(t!==this._focusedIndex&&!a[t]?.disabled){const o=this.activeTab;this._focusedIndex=t,this.activeTab=a[t].id,this.updateComplete.then(()=>{this.shadowRoot?.querySelector(`[role="tab"][data-tab-id="${a[t].id}"]`)?.focus()}),this.dispatchEvent(new CustomEvent("tab-change",{detail:{oldTab:o,newTab:a[t].id},bubbles:!0,composed:!0}))}}scrollTabIntoView(e){this.updateComplete.then(()=>{const a=this.shadowRoot?.querySelector(`[role="tab"][data-tab-id="${e}"]`);if(a&&this.tablist){const t=this.tablist.getBoundingClientRect(),i=a.getBoundingClientRect();i.left<t.left?this.tablist.scrollLeft-=t.left-i.left+16:i.right>t.right&&(this.tablist.scrollLeft+=i.right-t.right+16)}})}renderTabButton(e,a){const t=this.activeTab===e.id,i=this._focusedIndex===a,o=["tab__button",t?"tab__button--active":"",e.disabled?"tab__button--disabled":""].filter(Boolean).join(" "),l=["tab__label",t?"":"tab__label--inactive"].filter(Boolean).join(" "),b=["tab__description",t?"tab__description--active":""].filter(Boolean).join(" ");return s.html`
2
- <button
3
- role="tab"
4
- class=${o}
5
- data-tab-id=${e.id}
6
- aria-selected=${t?"true":"false"}
7
- aria-controls="panel-${e.id}"
8
- tabindex=${t||i?"0":"-1"}
9
- ?disabled=${e.disabled}
10
- @click=${()=>this.handleTabClick(e.id,e.disabled)}
11
- @focus=${()=>this.scrollTabIntoView(e.id)}
12
- >
13
- ${e.icon?s.html`<i class="${e.icon} tab__icon"></i>`:s.nothing}
14
- <div class="tab__content">
15
- <span class=${l}>${e.label}</span>
16
- ${e.description?s.html`<span class=${b}>${e.description}</span>`:s.nothing}
17
- </div>
18
- </button>
19
- `}renderTabPanel(e){const a=this.activeTab===e.id;if(!(!this.lazy||this._renderedTabs.has(e.id)))return s.nothing;const i=["tab__panel",a?"":"tab__panel--hidden"].filter(Boolean).join(" ");return s.html`
20
- <div
21
- role="tabpanel"
22
- id="panel-${e.id}"
23
- aria-labelledby="tab-${e.id}"
24
- class=${i}
25
- tabindex="0"
26
- >
27
- <slot name=${`panel-${e.id}`}>
28
- ${typeof e.content=="string"?s.html`${e.content}`:s.nothing}
29
- </slot>
30
- </div>
31
- `}render(){return s.html`
32
- <div class="tab">
33
- <div role="tablist" aria-label="Tabs" class="tab__list" @keydown=${this.handleKeyDown}>
34
- ${this.tabs.map((e,a)=>this.renderTabButton(e,a))}
35
- </div>
36
- <div class="tab__panels">${this.tabs.map(e=>this.renderTabPanel(e))}</div>
37
- </div>
38
- `}};exports.LogosphereTab.styles=[s.css`
39
- ${s.unsafeCSS(c)}
40
- `];r([n.property({type:Array})],exports.LogosphereTab.prototype,"tabs",2);r([n.property({type:String})],exports.LogosphereTab.prototype,"activeTab",2);r([n.property({type:Boolean})],exports.LogosphereTab.prototype,"lazy",2);r([n.property({type:String})],exports.LogosphereTab.prototype,"variant",2);r([n.state()],exports.LogosphereTab.prototype,"_focusedIndex",2);r([n.state()],exports.LogosphereTab.prototype,"_renderedTabs",2);r([n.query('[role="tablist"]')],exports.LogosphereTab.prototype,"tablist",2);exports.LogosphereTab=r([n.customElement("logosphere-tab")],exports.LogosphereTab);
package/dist/tab.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./tab-DcjAlXzU.cjs");Object.defineProperty(exports,"LogosphereTab",{enumerable:!0,get:()=>e.LogosphereTab});
package/dist/tab.js DELETED
@@ -1,4 +0,0 @@
1
- import { L as r } from "./tab-BKdN4xAz.js";
2
- export {
3
- r as LogosphereTab
4
- };
@@ -1,44 +0,0 @@
1
- "use strict";const i=require("lit"),t=require("lit/decorators.js"),p=require("lit/directives/live.js"),u=".textarea__field{width:100%;background:transparent;border:none;outline:none;font-size:var(--font-size-sm);font-family:var(--font-family-base);color:var(--color-body-text);box-sizing:border-box;line-height:1.5}.textarea__field::placeholder{color:var(--color-tertiary)}.textarea__field:disabled{cursor:not-allowed}.textarea__field--resize-none{resize:none}.textarea__field--resize-vertical{resize:vertical}.textarea__field--resize-horizontal{resize:horizontal}.textarea__field--resize-both{resize:both}.textarea__field--auto-resize{resize:none;overflow:hidden}.textarea__clear-btn{border:none;background:transparent;color:var(--color-gray-400);cursor:pointer;padding:0;display:inline-flex;align-items:flex-start;align-self:flex-start;margin-top:var(--spacing-1);outline:none;flex-shrink:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.textarea__clear-btn:hover{color:var(--color-gray-600)}";var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,r=(l,e,a,o)=>{for(var s=o>1?void 0:o?y(e,a):e,n=l.length-1,h;n>=0;n--)(h=l[n])&&(s=(o?h(e,a,s):h(s))||s);return o&&s&&d(e,a,s),s};exports.TextArea=class extends i.LitElement{constructor(){super(...arguments),this.value="",this.placeholder="",this.name="",this.autocomplete="",this.rows=3,this.wrap="soft",this.resize="vertical",this.autoResize=!1,this.size="default",this.variant="default",this.showClear=!1,this.label="",this.helper="",this.error="",this.required=!1,this.disabled=!1,this.readonly=!1,this._internalError="",this.handleInput=e=>{const a=e.target;this.value=a.value,this.autoResize&&this.adjustHeight(),this._internalError&&(this._internalError="",this._textareaElement.setCustomValidity("")),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value,originalEvent:e}}))},this.handleChange=e=>{const a=e.target;this.value=a.value,a.checkValidity()||(this._internalError=a.validationMessage),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value,originalEvent:e}}))},this.handleKeyDown=e=>{this.dispatchEvent(new CustomEvent("keydown",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleKeyUp=e=>{this.dispatchEvent(new CustomEvent("keyup",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleClear=()=>{this.value="",this._textareaElement&&(this._textareaElement.value="",this.autoResize&&this.adjustHeight()),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:"",originalEvent:null}}))}}get textareaElement(){return this._textareaElement}focus(){this._textareaElement?.focus()}blur(){this._textareaElement?.blur()}select(){this._textareaElement?.select()}setSelectionRange(e,a,o){this._textareaElement?.setSelectionRange(e,a,o)}checkValidity(){return this._textareaElement?.checkValidity()??!0}reportValidity(){return this._textareaElement?.reportValidity()??!0}setCustomValidity(e){this._textareaElement?.setCustomValidity(e),this._internalError=e,this.requestUpdate()}adjustHeight(){!this.autoResize||!this._textareaElement||(this._textareaElement.style.height="auto",this._textareaElement.style.height=`${this._textareaElement.scrollHeight}px`)}updated(e){super.updated(e),e.has("value")&&this.autoResize&&this.adjustHeight()}getResizeClass(){return this.autoResize?"textarea__field--auto-resize":{none:"textarea__field--resize-none",vertical:"textarea__field--resize-vertical",horizontal:"textarea__field--resize-horizontal",both:"textarea__field--resize-both"}[this.resize]}render(){const e=this.error||this._internalError,a=this.showClear&&this.value&&!this.disabled&&!this.readonly,o=`textarea__field ${this.getResizeClass()}`;return i.html`
2
- <logosphere-formfield
3
- .label=${this.label}
4
- .helper=${this.helper}
5
- .error=${e}
6
- .required=${this.required}
7
- .disabled=${this.disabled}
8
- .readonly=${this.readonly}
9
- .placeholder=${this.placeholder}
10
- .size=${this.size}
11
- .variant=${this.variant}
12
- >
13
- <textarea
14
- class="${o}"
15
- .value=${p.live(this.value)}
16
- placeholder=${this.placeholder||i.nothing}
17
- name=${this.name||i.nothing}
18
- autocomplete=${this.autocomplete||i.nothing}
19
- ?required=${this.required}
20
- ?disabled=${this.disabled}
21
- ?readonly=${this.readonly}
22
- minlength=${this.minlength??i.nothing}
23
- maxlength=${this.maxlength??i.nothing}
24
- rows=${this.rows}
25
- cols=${this.cols??i.nothing}
26
- wrap=${this.wrap}
27
- @input=${this.handleInput}
28
- @change=${this.handleChange}
29
- @keydown=${this.handleKeyDown}
30
- @keyup=${this.handleKeyUp}
31
- ></textarea>
32
- ${a?i.html`
33
- <button
34
- type="button"
35
- slot="suffix"
36
- class="textarea__clear-btn"
37
- @click=${this.handleClear}
38
- tabindex="-1"
39
- >
40
- <ui-icon name="uil-times" size="14"></ui-icon>
41
- </button>
42
- `:i.nothing}
43
- </logosphere-formfield>
44
- `}};exports.TextArea.styles=[i.css`${i.unsafeCSS(u)}`];r([t.query("textarea")],exports.TextArea.prototype,"_textareaElement",2);r([t.property({type:String})],exports.TextArea.prototype,"value",2);r([t.property({type:String})],exports.TextArea.prototype,"placeholder",2);r([t.property({type:String})],exports.TextArea.prototype,"name",2);r([t.property({type:String})],exports.TextArea.prototype,"autocomplete",2);r([t.property({type:Number})],exports.TextArea.prototype,"minlength",2);r([t.property({type:Number})],exports.TextArea.prototype,"maxlength",2);r([t.property({type:Number})],exports.TextArea.prototype,"rows",2);r([t.property({type:Number})],exports.TextArea.prototype,"cols",2);r([t.property({type:String})],exports.TextArea.prototype,"wrap",2);r([t.property({type:String})],exports.TextArea.prototype,"resize",2);r([t.property({type:Boolean})],exports.TextArea.prototype,"autoResize",2);r([t.property({type:String})],exports.TextArea.prototype,"size",2);r([t.property({type:String})],exports.TextArea.prototype,"variant",2);r([t.property({type:Boolean})],exports.TextArea.prototype,"showClear",2);r([t.property({type:String})],exports.TextArea.prototype,"label",2);r([t.property({type:String})],exports.TextArea.prototype,"helper",2);r([t.property({type:String})],exports.TextArea.prototype,"error",2);r([t.property({type:Boolean})],exports.TextArea.prototype,"required",2);r([t.property({type:Boolean})],exports.TextArea.prototype,"disabled",2);r([t.property({type:Boolean})],exports.TextArea.prototype,"readonly",2);r([t.state()],exports.TextArea.prototype,"_internalError",2);exports.TextArea=r([t.customElement("logosphere-textarea")],exports.TextArea);
@@ -1,204 +0,0 @@
1
- import { LitElement as d, nothing as l, html as u, unsafeCSS as y, css as c } from "lit";
2
- import { query as m, property as a, state as _, customElement as v } from "lit/decorators.js";
3
- import { live as f } from "lit/directives/live.js";
4
- const b = ".textarea__field{width:100%;background:transparent;border:none;outline:none;font-size:var(--font-size-sm);font-family:var(--font-family-base);color:var(--color-body-text);box-sizing:border-box;line-height:1.5}.textarea__field::placeholder{color:var(--color-tertiary)}.textarea__field:disabled{cursor:not-allowed}.textarea__field--resize-none{resize:none}.textarea__field--resize-vertical{resize:vertical}.textarea__field--resize-horizontal{resize:horizontal}.textarea__field--resize-both{resize:both}.textarea__field--auto-resize{resize:none;overflow:hidden}.textarea__clear-btn{border:none;background:transparent;color:var(--color-gray-400);cursor:pointer;padding:0;display:inline-flex;align-items:flex-start;align-self:flex-start;margin-top:var(--spacing-1);outline:none;flex-shrink:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.textarea__clear-btn:hover{color:var(--color-gray-600)}";
5
- var x = Object.defineProperty, g = Object.getOwnPropertyDescriptor, r = (e, i, s, n) => {
6
- for (var o = n > 1 ? void 0 : n ? g(i, s) : i, h = e.length - 1, p; h >= 0; h--)
7
- (p = e[h]) && (o = (n ? p(i, s, o) : p(o)) || o);
8
- return n && o && x(i, s, o), o;
9
- };
10
- let t = class extends d {
11
- constructor() {
12
- super(...arguments), this.value = "", this.placeholder = "", this.name = "", this.autocomplete = "", this.rows = 3, this.wrap = "soft", this.resize = "vertical", this.autoResize = !1, this.size = "default", this.variant = "default", this.showClear = !1, this.label = "", this.helper = "", this.error = "", this.required = !1, this.disabled = !1, this.readonly = !1, this._internalError = "", this.handleInput = (e) => {
13
- const i = e.target;
14
- this.value = i.value, this.autoResize && this.adjustHeight(), this._internalError && (this._internalError = "", this._textareaElement.setCustomValidity("")), this.dispatchEvent(new CustomEvent("input", {
15
- bubbles: !0,
16
- composed: !0,
17
- detail: { value: this.value, originalEvent: e }
18
- }));
19
- }, this.handleChange = (e) => {
20
- const i = e.target;
21
- this.value = i.value, i.checkValidity() || (this._internalError = i.validationMessage), this.dispatchEvent(new CustomEvent("change", {
22
- bubbles: !0,
23
- composed: !0,
24
- detail: { value: this.value, originalEvent: e }
25
- }));
26
- }, this.handleKeyDown = (e) => {
27
- this.dispatchEvent(new CustomEvent("keydown", {
28
- bubbles: !0,
29
- composed: !0,
30
- detail: { key: e.key, originalEvent: e }
31
- }));
32
- }, this.handleKeyUp = (e) => {
33
- this.dispatchEvent(new CustomEvent("keyup", {
34
- bubbles: !0,
35
- composed: !0,
36
- detail: { key: e.key, originalEvent: e }
37
- }));
38
- }, this.handleClear = () => {
39
- this.value = "", this._textareaElement && (this._textareaElement.value = "", this.autoResize && this.adjustHeight()), this.dispatchEvent(new CustomEvent("clear", { bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("input", {
40
- bubbles: !0,
41
- composed: !0,
42
- detail: { value: "", originalEvent: null }
43
- }));
44
- };
45
- }
46
- get textareaElement() {
47
- return this._textareaElement;
48
- }
49
- focus() {
50
- this._textareaElement?.focus();
51
- }
52
- blur() {
53
- this._textareaElement?.blur();
54
- }
55
- select() {
56
- this._textareaElement?.select();
57
- }
58
- setSelectionRange(e, i, s) {
59
- this._textareaElement?.setSelectionRange(e, i, s);
60
- }
61
- checkValidity() {
62
- return this._textareaElement?.checkValidity() ?? !0;
63
- }
64
- reportValidity() {
65
- return this._textareaElement?.reportValidity() ?? !0;
66
- }
67
- setCustomValidity(e) {
68
- this._textareaElement?.setCustomValidity(e), this._internalError = e, this.requestUpdate();
69
- }
70
- adjustHeight() {
71
- !this.autoResize || !this._textareaElement || (this._textareaElement.style.height = "auto", this._textareaElement.style.height = `${this._textareaElement.scrollHeight}px`);
72
- }
73
- updated(e) {
74
- super.updated(e), e.has("value") && this.autoResize && this.adjustHeight();
75
- }
76
- getResizeClass() {
77
- return this.autoResize ? "textarea__field--auto-resize" : {
78
- none: "textarea__field--resize-none",
79
- vertical: "textarea__field--resize-vertical",
80
- horizontal: "textarea__field--resize-horizontal",
81
- both: "textarea__field--resize-both"
82
- }[this.resize];
83
- }
84
- render() {
85
- const e = this.error || this._internalError, i = this.showClear && this.value && !this.disabled && !this.readonly, s = `textarea__field ${this.getResizeClass()}`;
86
- return u`
87
- <logosphere-formfield
88
- .label=${this.label}
89
- .helper=${this.helper}
90
- .error=${e}
91
- .required=${this.required}
92
- .disabled=${this.disabled}
93
- .readonly=${this.readonly}
94
- .placeholder=${this.placeholder}
95
- .size=${this.size}
96
- .variant=${this.variant}
97
- >
98
- <textarea
99
- class="${s}"
100
- .value=${f(this.value)}
101
- placeholder=${this.placeholder || l}
102
- name=${this.name || l}
103
- autocomplete=${this.autocomplete || l}
104
- ?required=${this.required}
105
- ?disabled=${this.disabled}
106
- ?readonly=${this.readonly}
107
- minlength=${this.minlength ?? l}
108
- maxlength=${this.maxlength ?? l}
109
- rows=${this.rows}
110
- cols=${this.cols ?? l}
111
- wrap=${this.wrap}
112
- @input=${this.handleInput}
113
- @change=${this.handleChange}
114
- @keydown=${this.handleKeyDown}
115
- @keyup=${this.handleKeyUp}
116
- ></textarea>
117
- ${i ? u`
118
- <button
119
- type="button"
120
- slot="suffix"
121
- class="textarea__clear-btn"
122
- @click=${this.handleClear}
123
- tabindex="-1"
124
- >
125
- <ui-icon name="uil-times" size="14"></ui-icon>
126
- </button>
127
- ` : l}
128
- </logosphere-formfield>
129
- `;
130
- }
131
- };
132
- t.styles = [c`${y(b)}`];
133
- r([
134
- m("textarea")
135
- ], t.prototype, "_textareaElement", 2);
136
- r([
137
- a({ type: String })
138
- ], t.prototype, "value", 2);
139
- r([
140
- a({ type: String })
141
- ], t.prototype, "placeholder", 2);
142
- r([
143
- a({ type: String })
144
- ], t.prototype, "name", 2);
145
- r([
146
- a({ type: String })
147
- ], t.prototype, "autocomplete", 2);
148
- r([
149
- a({ type: Number })
150
- ], t.prototype, "minlength", 2);
151
- r([
152
- a({ type: Number })
153
- ], t.prototype, "maxlength", 2);
154
- r([
155
- a({ type: Number })
156
- ], t.prototype, "rows", 2);
157
- r([
158
- a({ type: Number })
159
- ], t.prototype, "cols", 2);
160
- r([
161
- a({ type: String })
162
- ], t.prototype, "wrap", 2);
163
- r([
164
- a({ type: String })
165
- ], t.prototype, "resize", 2);
166
- r([
167
- a({ type: Boolean })
168
- ], t.prototype, "autoResize", 2);
169
- r([
170
- a({ type: String })
171
- ], t.prototype, "size", 2);
172
- r([
173
- a({ type: String })
174
- ], t.prototype, "variant", 2);
175
- r([
176
- a({ type: Boolean })
177
- ], t.prototype, "showClear", 2);
178
- r([
179
- a({ type: String })
180
- ], t.prototype, "label", 2);
181
- r([
182
- a({ type: String })
183
- ], t.prototype, "helper", 2);
184
- r([
185
- a({ type: String })
186
- ], t.prototype, "error", 2);
187
- r([
188
- a({ type: Boolean })
189
- ], t.prototype, "required", 2);
190
- r([
191
- a({ type: Boolean })
192
- ], t.prototype, "disabled", 2);
193
- r([
194
- a({ type: Boolean })
195
- ], t.prototype, "readonly", 2);
196
- r([
197
- _()
198
- ], t.prototype, "_internalError", 2);
199
- t = r([
200
- v("logosphere-textarea")
201
- ], t);
202
- export {
203
- t as T
204
- };
package/dist/textarea.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./text-area-BkHdLnZj.cjs");Object.defineProperty(exports,"TextArea",{enumerable:!0,get:()=>e.TextArea});
package/dist/textarea.js DELETED
@@ -1,4 +0,0 @@
1
- import { T as a } from "./text-area-CC24lj8v.js";
2
- export {
3
- a as TextArea
4
- };