@haiilo/catalyst 13.0.3 → 13.2.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 (74) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/{p-8206d34b.entry.js → p-1823cdaa.entry.js} +4 -4
  3. package/dist/catalyst/p-1823cdaa.entry.js.map +1 -0
  4. package/dist/cjs/cat-alert_30.cjs.entry.js +58 -53
  5. package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
  6. package/dist/cjs/catalyst.cjs.js +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/cat-alert/cat-alert.js +1 -1
  9. package/dist/collection/components/cat-badge/cat-badge.js +1 -1
  10. package/dist/collection/components/cat-button-group/cat-button-group.js +1 -1
  11. package/dist/collection/components/cat-card/cat-card.js +1 -1
  12. package/dist/collection/components/cat-checkbox/cat-checkbox.js +2 -2
  13. package/dist/collection/components/cat-date/cat-date.js +2 -2
  14. package/dist/collection/components/cat-date-inline/cat-date-inline.js +4 -4
  15. package/dist/collection/components/cat-datepicker/cat-datepicker.js +3 -3
  16. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +2 -2
  17. package/dist/collection/components/cat-dropdown/cat-dropdown.js +1 -1
  18. package/dist/collection/components/cat-form-group/cat-form-group.js +1 -1
  19. package/dist/collection/components/cat-icon/cat-icon.js +1 -1
  20. package/dist/collection/components/cat-input/cat-input.css +60 -0
  21. package/dist/collection/components/cat-input/cat-input.js +47 -4
  22. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  23. package/dist/collection/components/cat-pagination/cat-pagination.js +2 -2
  24. package/dist/collection/components/cat-radio/cat-radio.js +2 -2
  25. package/dist/collection/components/cat-radio-group/cat-radio-group.js +1 -1
  26. package/dist/collection/components/cat-scrollable/cat-scrollable.js +3 -3
  27. package/dist/collection/components/cat-select/cat-select.js +4 -4
  28. package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
  29. package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -1
  30. package/dist/collection/components/cat-spinner/cat-spinner.js +2 -2
  31. package/dist/collection/components/cat-tab/cat-tab.js +1 -1
  32. package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
  33. package/dist/collection/components/cat-tag/cat-tag.js +1 -1
  34. package/dist/collection/components/cat-textarea/cat-textarea.js +3 -3
  35. package/dist/collection/components/cat-time/cat-time.js +2 -2
  36. package/dist/collection/components/cat-toggle/cat-toggle.js +2 -2
  37. package/dist/collection/components/cat-tooltip/cat-tooltip.js +2 -2
  38. package/dist/components/cat-alert.js +1 -1
  39. package/dist/components/cat-badge.js +1 -1
  40. package/dist/components/cat-button-group.js +1 -1
  41. package/dist/components/cat-card.js +1 -1
  42. package/dist/components/cat-checkbox2.js +2 -2
  43. package/dist/components/cat-date-inline2.js +4 -4
  44. package/dist/components/cat-date.js +2 -2
  45. package/dist/components/cat-datepicker-inline.js +2 -2
  46. package/dist/components/cat-datepicker.js +3 -3
  47. package/dist/components/cat-dropdown2.js +1 -1
  48. package/dist/components/cat-form-group.js +1 -1
  49. package/dist/components/cat-icon2.js +1 -1
  50. package/dist/components/cat-input2.js +12 -5
  51. package/dist/components/cat-input2.js.map +1 -1
  52. package/dist/components/cat-pagination.js +2 -2
  53. package/dist/components/cat-radio-group.js +1 -1
  54. package/dist/components/cat-radio.js +2 -2
  55. package/dist/components/cat-scrollable2.js +3 -3
  56. package/dist/components/cat-select-demo.js +1 -1
  57. package/dist/components/cat-select2.js +4 -4
  58. package/dist/components/cat-skeleton2.js +1 -1
  59. package/dist/components/cat-spinner2.js +2 -2
  60. package/dist/components/cat-tab.js +1 -1
  61. package/dist/components/cat-tabs.js +1 -1
  62. package/dist/components/cat-tag.js +1 -1
  63. package/dist/components/cat-textarea.js +3 -3
  64. package/dist/components/cat-time.js +2 -2
  65. package/dist/components/cat-toggle.js +2 -2
  66. package/dist/components/cat-tooltip.js +2 -2
  67. package/dist/esm/cat-alert_30.entry.js +58 -53
  68. package/dist/esm/cat-alert_30.entry.js.map +1 -1
  69. package/dist/esm/catalyst.js +1 -1
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/types/components/cat-input/cat-input.d.ts +8 -0
  72. package/dist/types/components.d.ts +16 -0
  73. package/package.json +2 -2
  74. package/dist/catalyst/p-8206d34b.entry.js.map +0 -1
@@ -213,14 +213,14 @@ const CatTime$1 = /*@__PURE__*/ proxyCustomElement(class CatTime extends HTMLEle
213
213
  }
214
214
  render() {
215
215
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
216
- return (h(Host, { key: 'e97c59467d5b8fafc2d669d7d53b68a192ec1bf9' }, h("cat-input", { key: 'b7262a8ca4f20ee50ead2d36d823a835f6ae1a67', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal ?? this.fallbackHorizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, testId: this.testId, nativeAttributes: this.nativeAttributes, timeMaskOptions: this.timeMaskOptions, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, h("span", { key: 'cde857253e5caa082367fca8acf598eb3fbcdc3d', slot: "label" }, this.hasSlottedLabel && h("slot", { key: 'd2c14ddcea08bdbf7c3693b4d4414c4720ab073c', name: "label" }), !this.hasSlottedLabel && this.label, h("span", { key: '66e1847bb5cbbd5c038a06b2f700021cc8f19db7', class: "label-aria" }, " (HH:mm)")), h("div", { key: '8155b1601a895c7596f12d2d8d36ef0b4195791d', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (h("cat-button", { key: '4e42649a84b347c5f4c07e7ab97c5740fdaeebbd', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? this.localizedDayPeriods.am : this.localizedDayPeriods.pm)), h("cat-dropdown", { key: '72c398704e4170f4b14fb00b1bf1adbddc79ad9a', slot: "addon", placement: this.placement }, h("cat-button", { key: 'd355e258dd3fc0f383dca2000835c73a4e793805', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), h("nav", { key: '741cb059b2ed3eb24b4786d5c6649ab92d590830', slot: "content", class: "cat-nav" }, h("ul", { key: 'abddf3e0980567866616cd2c9df44826bbf6202c' }, this.timeArray().map(time => {
216
+ return (h(Host, { key: 'c900a10f9992512537bb54a55f380148c698bd2d' }, h("cat-input", { key: 'f6447d6a18225762b6adc85955584d4710a9ffa5', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal ?? this.fallbackHorizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, testId: this.testId, nativeAttributes: this.nativeAttributes, timeMaskOptions: this.timeMaskOptions, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, h("span", { key: '328134e94616b73309294b1dbd60d9978b1fe32b', slot: "label" }, this.hasSlottedLabel && h("slot", { key: 'c7e48d1a65631ac9f05b30e6e03706771617a9eb', name: "label" }), !this.hasSlottedLabel && this.label, h("span", { key: '59dd274d4039d8ce890b95dd6f9efdc4fc68b456', class: "label-aria" }, " (HH:mm)")), h("div", { key: '962771fb4390695dfa17eef88cde5299dff060df', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (h("cat-button", { key: 'a0fa293b5c430efb3ee873da2f8c6ee9f6e22935', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? this.localizedDayPeriods.am : this.localizedDayPeriods.pm)), h("cat-dropdown", { key: '14d7f7b5063d5f74d6f1272742badce87ed150ac', slot: "addon", placement: this.placement }, h("cat-button", { key: '1ae784a0d45b0ec92f57a1845a2c7f04097e6d3b', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), h("nav", { key: 'bfc501e88cd1941fffc3d10b8aed69d830c9bec6', slot: "content", class: "cat-nav" }, h("ul", { key: 'd65978850e0416d8de748293dcf12397b531fc54' }, this.timeArray().map(time => {
217
217
  const isoTime = formatIso(time);
218
218
  const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
219
219
  return (h("li", null, h("cat-button", { class: {
220
220
  'cat-nav-item': true,
221
221
  'time-disabled': disabled
222
222
  }, disabled: disabled, active: isoTime === this.value, color: isoTime === this.value ? 'primary' : 'secondary', variant: isoTime === this.value ? 'filled' : 'outlined', onCatClick: () => this.select(time), "data-time": isoTime }, this.format(time))));
223
- }))))), this.hasSlottedHint && (h("span", { key: '3d194dd408de4efe247e4f48c0aba2e4c40038c9', slot: "hint" }, h("slot", { key: '27e14b7a27643229e8bfea13081de35acab79b2a', name: "hint" }))))));
223
+ }))))), this.hasSlottedHint && (h("span", { key: 'b34b48f7db86956f9f9211a80ba7f0afb0dba10d', slot: "hint" }, h("slot", { key: 'd170ddd7ebe8a75af7b2410771d30bcc4c23bceb', name: "hint" }))))));
224
224
  }
225
225
  timeArray() {
226
226
  const result = [];
@@ -80,13 +80,13 @@ const CatToggle$1 = /*@__PURE__*/ proxyCustomElement(class CatToggle extends HTM
80
80
  }
81
81
  render() {
82
82
  this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
83
- return (h(Host, { key: '4648a8de33b6a63ba94cd5fd15b6e3e65986470d' }, h("label", { key: '063aa2a20504db693e4ae6d96733f96217dcc4b4', htmlFor: this.id, class: {
83
+ return (h(Host, { key: '7285035e8798acd7e31d9f244185f66dfd1e8ff2' }, h("label", { key: 'fcfa457a536a826b113493f2851e4fb92336f191', htmlFor: this.id, class: {
84
84
  'is-hidden': this.labelHidden,
85
85
  'is-disabled': this.disabled,
86
86
  'label-left': this.labelLeft,
87
87
  'align-center': this.alignment === 'center',
88
88
  'align-end': this.alignment === 'bottom'
89
- } }, h("input", { key: 'd7ed53b6668b5335621e92fe648f28d34e43d371', "data-test": this.testId, ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, class: "form-check-input", role: "switch", onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: '852f811c47488c5ee7ba5536c79c82502dd18f92', class: "toggle" }), h("span", { key: '00efe1901a1b2ad93b24362124c7d5b604ca62a9', class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { key: '039e0fdcd80e110bb1b2ab6ac74472ff9d2e82f4', name: "label" })) || this.label)), this.hasHint && (h("div", { key: '4c59d7a015ac1d0c9430e569244ba20bd71886e2', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: '53f611eaded0a9048c79d82a444144c104589208', class: "toggle-placeholder" }), h(CatFormHint, { key: '250ebfbbbeafe28c1e47c857c6af1ee2429edcb5', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
89
+ } }, h("input", { key: 'db247c0b593b85237fa9f0c369d706d6fa16d7ec', "data-test": this.testId, ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, class: "form-check-input", role: "switch", onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: 'fa4934e1d6f40378b0d2b3aa3e08c1c1444579d3', class: "toggle" }), h("span", { key: 'e4c888660de8acf4ca9c0bf093eb9546bd67e994', class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { key: 'c2dbaa736eb123c5adcc9e0cda6cef89bf6fd4b8', name: "label" })) || this.label)), this.hasHint && (h("div", { key: '087543ee1d86ccc4739d8f33e5cf4de419818d43', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: '424513a88e130972ec5a6b64c7eb8639691258c2', class: "toggle-placeholder" }), h(CatFormHint, { key: 'a1c87e7ce6ed636f69760dbdbb4f54688b0fce4e', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
90
90
  }
91
91
  get hasHint() {
92
92
  return !!this.hint || !!this.hasSlottedHint;
@@ -75,12 +75,12 @@ const CatTooltip$1 = /*@__PURE__*/ proxyCustomElement(class CatTooltip extends H
75
75
  this.hideTooltip();
76
76
  }
77
77
  render() {
78
- return (h(Host, { key: '48ac6350d679c11d238d55442d6455fc38eb44d7' }, h("slot", { key: '2ecd767bae2429800d94707498dd0d292b0bf5b4' }), h("div", { key: 'c59512dbe2c57622f7827aa143230dc1c5046281', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
78
+ return (h(Host, { key: '8f34e0ba58b9cf70b4764914d5f3edd36ed42c10' }, h("slot", { key: 'd053bf106d2884336c1cdeb55215bd62dbd6eae7' }), h("div", { key: '9f310741fd56f1e4441c45125010176621da0c59', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
79
79
  tooltip: true,
80
80
  'tooltip-hidden': this.inactive,
81
81
  'tooltip-round': this.round,
82
82
  [`tooltip-${this.size}`]: Boolean(this.size)
83
- } }, h("slot", { key: 'a0bdd025ca40adac969daef4a0b06b9aa8452fac', name: "content" }, h("p", { key: '83786352e3219af4e7cde38a1c8247042d44c66a' }, this.content)))));
83
+ } }, h("slot", { key: 'c99bd5cee9a1961d39a20c2049ee43675efc4b67', name: "content" }, h("p", { key: '66051fb6e03a9292a7c829b53162d307af2a914e' }, this.content)))));
84
84
  }
85
85
  addListeners() {
86
86
  this.trigger?.addEventListener('focusin', this.boundShowListener);