@haiilo/catalyst 12.4.0 → 12.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -908,7 +908,7 @@ const CatDate = class {
908
908
  }
909
909
  return '';
910
910
  }
911
- componentDidLoad() {
911
+ componentWillLoad() {
912
912
  const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');
913
913
  const [, p1, d1, p2, p3] = /(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(format) || [];
914
914
  this.dateMaskOptions = {
@@ -943,14 +943,14 @@ const CatDate = class {
943
943
  }
944
944
  render() {
945
945
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
946
- return (index.h(index.Host, { key: '446b89d959955840787f93b304c60c14610f19a3' }, index.h("cat-input", { key: 'd1a7ac9cac5bbfaf53ad06c7604503658a378bdd', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, testId: this.testId, nativeAttributes: this.nativeAttributes, value: this.inputValue, dateMaskOptions: this.dateMaskOptions, onCatFocus: e => {
946
+ return (index.h(index.Host, { key: '38c0f6d0b6edfcd762840f7fedcb47157b0f4a4c' }, index.h("cat-input", { key: '71a9ebc03ea49b1584b178ad8cb0f61306644e15', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, testId: this.testId, nativeAttributes: this.nativeAttributes, value: this.inputValue, dateMaskOptions: this.dateMaskOptions, onCatFocus: e => {
947
947
  this.inputFocused = e.target === this.input;
948
948
  e.stopPropagation();
949
949
  this.catFocus.emit(e.detail);
950
950
  }, onCatBlur: e => {
951
951
  e.stopPropagation();
952
952
  this.onInputBlur(e.detail);
953
- } }, index.h("span", { key: '04cf706a258dd0a8f45bbd938ac9cd0feb663044', slot: "label" }, this.label, index.h("span", { key: '87cb203b21f42eca664a06bf0363158f577248a7', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: '7bfa57a6f2758e8299f49ce9d7d114368c088084', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, index.h("cat-button", { key: 'e5fce006dccc245f98800c21adbe00354813f008', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), index.h("div", { key: '20896aaf3e536510c0c8ca1e354989ab9afc42e0', slot: "content" }, index.h("cat-date-inline", { key: '6b3d8c5cdf01af45926ef3593d72a6625bb022cb', ref: el => (this.dateInline = el), min: this.min, max: this.max, value: this.value, hint: true, weeks: true, noClear: true, onCatChange: this.onDateChange.bind(this) }))))));
953
+ } }, index.h("span", { key: 'ca8eb678246d9047ba2f5e38b0e392333cb20f70', slot: "label" }, this.label, index.h("span", { key: 'd72fd4de36d76793515480db04b25909b703521e', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: 'c58fd79c97821495b73ddef3311235065ff10ce3', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, index.h("cat-button", { key: 'f0f4b2ff2be00dfba6c93fb0218c35f0361c5c63', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), index.h("div", { key: 'b5c78f6d0cd4a94af38f3c5d2f7aeceea02eaff5', slot: "content" }, index.h("cat-date-inline", { key: '71f66a073ba5e5e107defac3771064ac5d48eee9', ref: el => (this.dateInline = el), min: this.min, max: this.max, value: this.value, hint: true, weeks: true, noClear: true, onCatChange: this.onDateChange.bind(this) }))))));
954
954
  }
955
955
  getTriggerA11yLabel() {
956
956
  const date = this.locale.fromLocalISO(this.value);
@@ -7909,11 +7909,11 @@ const CatFormGroup = class {
7909
7909
  }
7910
7910
  onHorizontalChanged(newHorizontal) {
7911
7911
  this.formElements.forEach(element => {
7912
- element.horizontal = newHorizontal;
7912
+ element.horizontal = element.horizontal ?? newHorizontal;
7913
7913
  });
7914
7914
  }
7915
7915
  render() {
7916
- return (index.h(index.Host, { key: 'c9fe233663c9967b3e78334e6994ceb62653c19c', style: { '--label-size': this.labelSize } }, index.h("slot", { key: '49274e5e31644d6f7d042033e975d8b91d6aaea6', onSlotchange: this.onSlotChange.bind(this) })));
7916
+ return (index.h(index.Host, { key: 'db0a498ef54f74b0db89f17ba628626576fe4410', style: { '--label-size': this.labelSize } }, index.h("slot", { key: '28391f2acbd06baca30aaebb57e6bd3d20ab6532', onSlotchange: this.onSlotChange.bind(this) })));
7917
7917
  }
7918
7918
  onSlotChange() {
7919
7919
  this.formElements = Array.from(this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker'));