@sula-tech/webcomponents 0.7.3 → 0.7.5

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.
@@ -21598,6 +21598,7 @@ const SulaTextarea = class {
21598
21598
  this.changeElementsStyle();
21599
21599
  }
21600
21600
  changeElementsStyle() {
21601
+ if (!this.labelElement || !this.activeLabelElement) return;
21601
21602
  this.activeLabelElement.style.display = this.isActive ? "flex" : "none";
21602
21603
  this.labelElement.style.display = this.isActive ? "none" : "block";
21603
21604
  if (!this.isActive) {
@@ -21607,12 +21608,12 @@ const SulaTextarea = class {
21607
21608
  render() {
21608
21609
  const e = this.rows * 24 + 48;
21609
21610
  return h$1(Host, {
21610
- key: "71e17dbbb92c7a05d8988820c0599b39a0f841a2",
21611
+ key: "1ec5c0b8f04ea2f32d48301334d2c717327d0b17",
21611
21612
  ref: e => this.node = e
21612
21613
  }, h$1("div", {
21613
- key: "9be717191ecd92216c42830dfda5ea14a3c5c939"
21614
+ key: "be0e209759746014407a3dc9aa553faea5b4f7f9"
21614
21615
  }, h$1("div", {
21615
- key: "3765ff81f012dce9438d9c00d694fb61864acf79",
21616
+ key: "238be270fa3cfdbdd0f4a5cda9d99deeb7c9667d",
21616
21617
  id: "textarea-container",
21617
21618
  class: {
21618
21619
  "relative border rounded-sm px-16 py-12 outline-none caret-brand-primary": true,
@@ -21628,7 +21629,7 @@ const SulaTextarea = class {
21628
21629
  onFocus: this.handleFocus,
21629
21630
  onClick: this.handleTextareaClick
21630
21631
  }, h$1("label", {
21631
- key: "252bc2b94a3a39a478a6c919bc181514eeb13891",
21632
+ key: "66812b881d9396ff093cac598e6c64a54e1cdbad",
21632
21633
  class: {
21633
21634
  "text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]": true,
21634
21635
  "text-text-primary": !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
@@ -21637,7 +21638,7 @@ const SulaTextarea = class {
21637
21638
  },
21638
21639
  ref: e => this.labelElement = e
21639
21640
  }, this.label), h$1("label", {
21640
- key: "71505a321c84a6c33668cb0f8e67877943225c99",
21641
+ key: "e0b2a3f1d35b7bd047b6324464772697d565076d",
21641
21642
  class: {
21642
21643
  "absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down": true,
21643
21644
  "text-sm top-12 left-16": this.isActive,
@@ -21647,7 +21648,7 @@ const SulaTextarea = class {
21647
21648
  },
21648
21649
  ref: e => this.activeLabelElement = e
21649
21650
  }, this.label), h$1("textarea", {
21650
- key: "55fdbfcf690c8198c62299d884cd85bba5f08346",
21651
+ key: "77603b5c3bfb9430e5a41f0b219c5f0597f4ab92",
21651
21652
  ref: e => this.textareaElement = e,
21652
21653
  placeholder: this.isActive ? this.placeholder : "",
21653
21654
  rows: this.rows,
@@ -21665,10 +21666,10 @@ const SulaTextarea = class {
21665
21666
  onBlur: this.handleBlur,
21666
21667
  value: this.textValue
21667
21668
  })), (this.helpText || this.maxLength) && h$1("div", {
21668
- key: "a4d90c39f337137a50ac71ffdd1f0b0714761de9",
21669
+ key: "ed5e9397e617eb07241dc26fed75d35f0abd16fd",
21669
21670
  class: "flex justify-between items-center px-16 mt-4 text-sm"
21670
21671
  }, this.helpText && h$1("div", {
21671
- key: "a1368830518a465f2d3bec91eec42966a5eee1c0",
21672
+ key: "3ee82fca291f045dcee3c2c29da6ac625ee42d44",
21672
21673
  id: "textarea-help-text",
21673
21674
  class: {
21674
21675
  "text-text-primary": this.status === SulaTextareaStatus.Default && !this.disabled,
@@ -21676,7 +21677,7 @@ const SulaTextarea = class {
21676
21677
  "text-text-disabled": this.disabled
21677
21678
  }
21678
21679
  }, this.helpText), this.maxLength && h$1("div", {
21679
- key: "a53bdb59f7dfab7c276a9fd34921026f25bccf12",
21680
+ key: "d4a3503ef45089512b85cf2cb28c32f655f9b17c",
21680
21681
  id: "max-length-container",
21681
21682
  class: {
21682
21683
  "text-text-primary": this.status === SulaTextareaStatus.Default && !this.disabled,
@@ -21801,6 +21802,7 @@ const SulaTextfield = class {
21801
21802
  this.inputElement.focus();
21802
21803
  }
21803
21804
  changeElementsStyle() {
21805
+ if (!this.inputContainer || !this.labelElement) return;
21804
21806
  this.inputContainer.style.display = this.inputIsOpen ? "flex" : "none";
21805
21807
  this.labelElement.style.display = this.inputIsOpen ? "none" : "block";
21806
21808
  if (!this.inputIsOpen) {
@@ -21826,12 +21828,12 @@ const SulaTextfield = class {
21826
21828
  }
21827
21829
  render() {
21828
21830
  return h$1(Host, {
21829
- key: "46cd224f63ed98167fd261dc930014a0293ea614",
21831
+ key: "db19982329c8a6aa8989b3a68ef61a7453ee4a99",
21830
21832
  ref: e => this.node = e
21831
21833
  }, h$1("div", {
21832
- key: "feb3a3f5fccc779ecab04aae9fb6bf4f86cc6a6a"
21834
+ key: "daf060b490b07b535cb414b11c3c75f307f127aa"
21833
21835
  }, h$1("div", {
21834
- key: "7afb904201e65f95b1b13f97f6989c8d921afbe3",
21836
+ key: "1d84aec41f352537a124311c076eceec3271832a",
21835
21837
  id: "button-container",
21836
21838
  class: {
21837
21839
  "flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary": true,
@@ -21845,17 +21847,17 @@ const SulaTextfield = class {
21845
21847
  onFocus: this.handleFocus,
21846
21848
  onClick: this.handleInputClick
21847
21849
  }, !this.disabled && h$1("div", {
21848
- key: "02dc46c38c09147f966017f3e70df530b7ad175c",
21850
+ key: "6ec4a250e1bcd8f053b2dba7e6e6fe6842c1b9bf",
21849
21851
  class: {
21850
21852
  "hidden flex-col w-full": true,
21851
21853
  "pr-12": !!this.icon
21852
21854
  },
21853
21855
  ref: e => this.inputContainer = e
21854
21856
  }, h$1("label", {
21855
- key: "1ecfe54e70ede77ad085d408b71e1d0f3ee53133",
21857
+ key: "001ef2edc750497dc82a65341f98289fd8d28c6d",
21856
21858
  class: "font-bold text-sm text-text-primary from-down"
21857
21859
  }, this.label), h$1("input", {
21858
- key: "e08732fbd8fb08a03dfd3eadc7884ad632b8c809",
21860
+ key: "96c0725c63ed92ddbc164f8efcdc003707eb0115",
21859
21861
  type: this.type,
21860
21862
  ref: e => this.inputElement = e,
21861
21863
  placeholder: this.placeholder,
@@ -21864,7 +21866,7 @@ const SulaTextfield = class {
21864
21866
  onFocus: this.handleInputFocus,
21865
21867
  value: this.textValue
21866
21868
  })), h$1("div", {
21867
- key: "e1c37bffee8df5505c2757610b8f5798aded0d59",
21869
+ key: "f65cd97f9ddcadcc07789d8d3dc9421e82e31d78",
21868
21870
  id: "textfield-label",
21869
21871
  class: {
21870
21872
  "text-base flex items-center": true,
@@ -21873,25 +21875,25 @@ const SulaTextfield = class {
21873
21875
  },
21874
21876
  ref: e => this.labelElement = e
21875
21877
  }, this.label), (!!this.icon || this.type === SulaTextfieldType.Password) && h$1("div", {
21876
- key: "05a531ae49ea6ab7301ac792f7f8c50dcd366df7",
21878
+ key: "27596e159d5bcdd52f587350fa7ed619d5a6346e",
21877
21879
  class: "flex items-center justify-center",
21878
21880
  onClick: this.handleIconClick
21879
21881
  }, h$1("sula-icon", {
21880
- key: "b23ce605c3e496b5bac81b04d4a4d7d08f87c70b",
21882
+ key: "2fb87a5df61f3ed9f50f404ca8ff2988c71d10a7",
21881
21883
  icon: this.getInputIcon(),
21882
21884
  customClass: `text-2xl ${this.disabled ? "text-icon-disabled" : "text-icon-primary"}`
21883
21885
  }))), (this.helpText || this.maxLength) && !this.disabled && h$1("div", {
21884
- key: "d3a0d8f6de88b5e18da0e7667ec644a3473e29c3",
21886
+ key: "d54b53d64879e9a454a72c7e6726c8b0f5905baa",
21885
21887
  class: "flex justify-between items-center px-16 mt-4 text-sm"
21886
21888
  }, this.helpText && h$1("div", {
21887
- key: "0e1027cf8e761bbbc5830242f0cb733c152e5fb6",
21889
+ key: "7ded73f462e82f41b8766e4654cd47fabf3b3a40",
21888
21890
  id: "textfield-help-text",
21889
21891
  class: {
21890
21892
  "text-text-primary": this.status === SulaTextfieldStatus.Default,
21891
21893
  "text-feedback-error": this.status === SulaTextfieldStatus.Error
21892
21894
  }
21893
21895
  }, this.helpText), this.maxLength && h$1("div", {
21894
- key: "8c271af5206a0b44748125bed4456dcb6b357117",
21896
+ key: "c62b62d8b8c99a775a31092479f1e4d8f581908c",
21895
21897
  id: "max-length-container",
21896
21898
  class: {
21897
21899
  "text-text-primary": this.status === SulaTextfieldStatus.Default,
@@ -22180,4 +22182,4 @@ SulaTimelineList.style = sulaTimelineListCss;
22180
22182
 
22181
22183
  export { SulaAvatar as sula_avatar, SulaBadge as sula_badge, SulaButton as sula_button, SulaCheckbox as sula_checkbox, SulaChip as sula_chip, SulaDropdown as sula_dropdown, SulaIcon as sula_icon, SulaLoader as sula_loader, SulaMenuSelectList as sula_menu_select_list, SulaProgressBar as sula_progress_bar, SulaRadioButton as sula_radio_button, SulaSearchBar as sula_search_bar, SulaSwitch as sula_switch, SulaTag as sula_tag, SulaTextarea as sula_textarea, SulaTextfield as sula_textfield, SulaTiles as sula_tiles, SulaTimelineList as sula_timeline_list };
22182
22184
  //# sourceMappingURL=sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-dropdown.sula-icon.sula-loader.sula-menu-select-list.sula-progress-bar.sula-radio-button.sula-search-bar.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.sula-timeline-list.entry.esm.js.map
22183
- //# sourceMappingURL=p-43b2dde5.entry.js.map
22185
+ //# sourceMappingURL=p-e86b2271.entry.js.map