@haiilo/catalyst 0.6.0 → 0.7.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 (101) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/catalyst.esm.js.map +1 -1
  3. package/dist/catalyst/p-12486027.js.map +1 -1
  4. package/dist/catalyst/p-12b96af6.js +2 -0
  5. package/dist/catalyst/p-12b96af6.js.map +1 -0
  6. package/dist/catalyst/p-4c9cd203.entry.js +2 -0
  7. package/dist/catalyst/p-4c9cd203.entry.js.map +1 -0
  8. package/dist/catalyst/p-5616e2cd.js +2 -0
  9. package/dist/catalyst/p-5616e2cd.js.map +1 -0
  10. package/dist/catalyst/p-9d2eab4f.entry.js +10 -0
  11. package/dist/catalyst/p-9d2eab4f.entry.js.map +1 -0
  12. package/dist/cjs/app-globals-aa29ad72.js.map +1 -1
  13. package/dist/cjs/{cat-alert_16.cjs.entry.js → cat-alert_18.cjs.entry.js} +169 -43
  14. package/dist/cjs/cat-alert_18.cjs.entry.js.map +1 -0
  15. package/dist/cjs/cat-form-hint-93a6936b.js +22 -0
  16. package/dist/cjs/cat-form-hint-93a6936b.js.map +1 -0
  17. package/dist/cjs/cat-textarea.cjs.entry.js +12 -12
  18. package/dist/cjs/cat-textarea.cjs.entry.js.map +1 -1
  19. package/dist/cjs/catalyst.cjs.js +2 -2
  20. package/dist/cjs/{index-5d72f0e4.js → index-499bad41.js} +44 -1
  21. package/dist/cjs/index-499bad41.js.map +1 -0
  22. package/dist/cjs/loader.cjs.js +2 -2
  23. package/dist/collection/collection-manifest.json +2 -0
  24. package/dist/collection/components/cat-checkbox/cat-checkbox.css +14 -0
  25. package/dist/collection/components/cat-checkbox/cat-checkbox.js +43 -11
  26. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  27. package/dist/collection/components/cat-form-hint/cat-form-hint.js +16 -0
  28. package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -0
  29. package/dist/collection/components/cat-input/cat-input.css +12 -6
  30. package/dist/collection/components/cat-input/cat-input.js +23 -25
  31. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  32. package/dist/collection/components/cat-radio/cat-radio.css +14 -0
  33. package/dist/collection/components/cat-radio/cat-radio.js +40 -8
  34. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  35. package/dist/collection/components/cat-tab/cat-tab.css +12 -0
  36. package/dist/collection/components/cat-tab/cat-tab.js +203 -0
  37. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -0
  38. package/dist/collection/components/cat-tabs/cat-tabs.css +33 -0
  39. package/dist/collection/components/cat-tabs/cat-tabs.js +122 -0
  40. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -0
  41. package/dist/collection/components/cat-textarea/cat-textarea.css +12 -6
  42. package/dist/collection/components/cat-textarea/cat-textarea.js +23 -18
  43. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  44. package/dist/collection/components/cat-toggle/cat-toggle.css +14 -0
  45. package/dist/collection/components/cat-toggle/cat-toggle.js +39 -7
  46. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  47. package/dist/collection/components/cat-tooltip/cat-tooltip.js +13 -8
  48. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  49. package/dist/components/cat-checkbox.js +15 -5
  50. package/dist/components/cat-checkbox.js.map +1 -1
  51. package/dist/components/cat-form-hint.js +20 -0
  52. package/dist/components/cat-form-hint.js.map +1 -0
  53. package/dist/components/cat-input.js +15 -18
  54. package/dist/components/cat-input.js.map +1 -1
  55. package/dist/components/cat-radio.js +15 -5
  56. package/dist/components/cat-radio.js.map +1 -1
  57. package/dist/components/cat-tab.d.ts +11 -0
  58. package/dist/components/cat-tab.js +70 -0
  59. package/dist/components/cat-tab.js.map +1 -0
  60. package/dist/components/cat-tabs.d.ts +11 -0
  61. package/dist/components/cat-tabs.js +107 -0
  62. package/dist/components/cat-tabs.js.map +1 -0
  63. package/dist/components/cat-textarea.js +13 -12
  64. package/dist/components/cat-textarea.js.map +1 -1
  65. package/dist/components/cat-toggle.js +15 -5
  66. package/dist/components/cat-toggle.js.map +1 -1
  67. package/dist/components/cat-tooltip.js +13 -8
  68. package/dist/components/cat-tooltip.js.map +1 -1
  69. package/dist/components/index.js.map +1 -1
  70. package/dist/esm/app-globals-cf55f7f5.js.map +1 -1
  71. package/dist/esm/{cat-alert_16.entry.js → cat-alert_18.entry.js} +168 -44
  72. package/dist/esm/cat-alert_18.entry.js.map +1 -0
  73. package/dist/esm/cat-form-hint-dc443c7c.js +20 -0
  74. package/dist/esm/cat-form-hint-dc443c7c.js.map +1 -0
  75. package/dist/esm/cat-textarea.entry.js +12 -12
  76. package/dist/esm/cat-textarea.entry.js.map +1 -1
  77. package/dist/esm/catalyst.js +2 -2
  78. package/dist/esm/{index-fd12be19.js → index-039e6f5f.js} +44 -2
  79. package/dist/esm/index-039e6f5f.js.map +1 -0
  80. package/dist/esm/loader.js +2 -2
  81. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +9 -0
  82. package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +19 -0
  83. package/dist/types/components/cat-input/cat-input.d.ts +7 -5
  84. package/dist/types/components/cat-radio/cat-radio.d.ts +9 -0
  85. package/dist/types/components/cat-tab/cat-tab.d.ts +43 -0
  86. package/dist/types/components/cat-tabs/cat-tabs.d.ts +25 -0
  87. package/dist/types/components/cat-textarea/cat-textarea.d.ts +7 -2
  88. package/dist/types/components/cat-toggle/cat-toggle.d.ts +9 -0
  89. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +1 -0
  90. package/dist/types/components.d.ts +134 -8
  91. package/package.json +2 -2
  92. package/dist/catalyst/p-6a5f0d4a.entry.js +0 -10
  93. package/dist/catalyst/p-6a5f0d4a.entry.js.map +0 -1
  94. package/dist/catalyst/p-a8629c54.entry.js +0 -2
  95. package/dist/catalyst/p-a8629c54.entry.js.map +0 -1
  96. package/dist/catalyst/p-bfc656ca.js +0 -2
  97. package/dist/catalyst/p-bfc656ca.js.map +0 -1
  98. package/dist/cjs/cat-alert_16.cjs.entry.js.map +0 -1
  99. package/dist/cjs/index-5d72f0e4.js.map +0 -1
  100. package/dist/esm/cat-alert_16.entry.js.map +0 -1
  101. package/dist/esm/index-fd12be19.js.map +0 -1
@@ -1,5 +1,6 @@
1
- import { r as registerInstance, h, H as Host, c as createEvent } from './index-fd12be19.js';
1
+ import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-039e6f5f.js';
2
2
  import { l as loglevel } from './loglevel-39a9e3f9.js';
3
+ import { C as CatFormHint } from './cat-form-hint-dc443c7c.js';
3
4
  import { C as CatIconRegistry, a as CatI18nRegistry } from './cat-icon-registry-3ea75755.js';
4
5
  import { N as NotificationsService } from './cat-notification-cd98c266.js';
5
6
 
@@ -459,16 +460,17 @@ const CatCard = class {
459
460
  };
460
461
  CatCard.style = catCardCss;
461
462
 
462
- const catCheckboxCss = ":host{display:flex;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}input{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid #d7dbe0;border-radius:0.125rem;transition:background-color 0.13s ease, border-color 0.13s ease}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 0.13s ease;width:70%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
463
+ const catCheckboxCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;margin:0}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}input{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid #d7dbe0;border-radius:0.125rem;transition:background-color 0.13s ease, border-color 0.13s ease}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 0.13s ease;width:70%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
463
464
 
464
- let nextUniqueId$5 = 0;
465
+ let nextUniqueId$6 = 0;
465
466
  const CatCheckbox = class {
466
467
  constructor(hostRef) {
467
468
  registerInstance(this, hostRef);
468
469
  this.catChange = createEvent(this, "catChange", 7);
469
470
  this.catFocus = createEvent(this, "catFocus", 7);
470
471
  this.catBlur = createEvent(this, "catBlur", 7);
471
- this.id = `cat-checkbox-${nextUniqueId$5++}`;
472
+ this.id = `cat-checkbox-${nextUniqueId$6++}`;
473
+ this.hasSlottedLabel = false;
472
474
  /**
473
475
  * Checked state of the checkbox
474
476
  */
@@ -500,7 +502,7 @@ const CatCheckbox = class {
500
502
  }
501
503
  }
502
504
  componentWillRender() {
503
- if (!this.label) {
505
+ if (!this.label && !this.hostElement.querySelector('[slot="label"]')) {
504
506
  loglevel.error('[A11y] Missing ARIA label on checkbox', this);
505
507
  }
506
508
  }
@@ -514,9 +516,14 @@ const CatCheckbox = class {
514
516
  this.input.focus(options);
515
517
  }
516
518
  render() {
517
- return (h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, h("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, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), h("span", { class: "box", "aria-hidden": "true", part: "checkbox" }, h("svg", { class: "check", viewBox: "0 0 12 10" }, h("polyline", { points: "1.5 6 4.5 9 10.5 1" })), h("svg", { class: "dash", viewBox: "0 0 12 10" }, h("polyline", { points: "1.5 5 10.5 5" }))), h("span", { class: "label", part: "label" }, this.label)));
519
+ return (h(Host, null, h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, h("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, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), h("span", { class: "box", "aria-hidden": "true", part: "checkbox" }, h("svg", { class: "check", viewBox: "0 0 12 10" }, h("polyline", { points: "1.5 6 4.5 9 10.5 1" })), h("svg", { class: "dash", viewBox: "0 0 12 10" }, h("polyline", { points: "1.5 5 10.5 5" }))), h("span", { class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label)), this.hintSection));
520
+ }
521
+ get hintSection() {
522
+ const hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
523
+ return ((this.hint || hasSlottedHint) && (h(CatFormHint, { hint: this.hint, slottedHint: hasSlottedHint && h("slot", { name: "hint" }) })));
518
524
  }
519
525
  onInput(event) {
526
+ this.value = this.input.value;
520
527
  this.catChange.emit(event);
521
528
  }
522
529
  onFocus(event) {
@@ -525,6 +532,7 @@ const CatCheckbox = class {
525
532
  onBlur(event) {
526
533
  this.catBlur.emit(event);
527
534
  }
535
+ get hostElement() { return getElement(this); }
528
536
  };
529
537
  CatCheckbox.style = catCheckboxCss;
530
538
 
@@ -552,9 +560,9 @@ const CatIcon = class {
552
560
  };
553
561
  CatIcon.style = catIconCss;
554
562
 
555
- const catInputCss = ":host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;margin-bottom:1rem}:host([hidden]){display:none}.input-wrapper{display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:0.25rem;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.input-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px #d7dbe0}.input-wrapper:not(.input-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid #d7dbe0;padding-right:0.75rem}.text-suffix{border-left:1px solid #d7dbe0;padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-inner-wrapper{display:flex;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}input.has-clearable{padding-right:1.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.input-hint{font-size:0.875rem;line-height:1rem;margin:0}";
563
+ const catInputCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;margin:0}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;margin-bottom:1rem}:host([hidden]){display:none}.input-wrapper{display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:0.25rem;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.input-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px #d7dbe0}.input-wrapper:not(.input-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid #d7dbe0;padding-right:0.75rem}.text-suffix{border-left:1px solid #d7dbe0;padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-inner-wrapper{display:flex;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}input.has-clearable{padding-right:1.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}";
556
564
 
557
- let nextUniqueId$4 = 0;
565
+ let nextUniqueId$5 = 0;
558
566
  const CatInput = class {
559
567
  constructor(hostRef) {
560
568
  registerInstance(this, hostRef);
@@ -562,8 +570,8 @@ const CatInput = class {
562
570
  this.catFocus = createEvent(this, "catFocus", 7);
563
571
  this.catBlur = createEvent(this, "catBlur", 7);
564
572
  this.i18n = CatI18nRegistry.getInstance();
565
- this.id = `cat-input-${nextUniqueId$4++}`;
566
- this.inputValue = '';
573
+ this.id = `cat-input-${nextUniqueId$5++}`;
574
+ this.hasSlottedLabel = false;
567
575
  /**
568
576
  * Whether the input should show a clear button.
569
577
  */
@@ -605,14 +613,8 @@ const CatInput = class {
605
613
  */
606
614
  this.type = 'text';
607
615
  }
608
- onValueChange(value) {
609
- this.inputValue = '' + (value !== null && value !== void 0 ? value : '');
610
- }
611
- componentWillLoad() {
612
- this.onValueChange(this.value);
613
- }
614
616
  componentWillRender() {
615
- if (!this.label) {
617
+ if (!this.label && !this.hostElement.querySelector('[slot="label"]')) {
616
618
  loglevel.error('[A11y] Missing ARIA label on input', this);
617
619
  }
618
620
  }
@@ -629,19 +631,23 @@ const CatInput = class {
629
631
  * Clear the input.
630
632
  */
631
633
  async clear() {
632
- this.inputValue = '';
634
+ this.value = '';
633
635
  }
634
636
  render() {
635
- return (h(Host, null, this.label && (h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, h("span", { part: "label" }, this.label, !this.required && (h("span", { class: "input-optional", "aria-hidden": "true" }, "(", this.i18n.getMessage('input.optional'), ")"))))), h("div", { class: {
637
+ return (h(Host, null, (this.hasSlottedLabel || this.label) && (h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, h("span", { part: "label" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label, !this.required && (h("span", { class: "input-optional", "aria-hidden": "true" }, "(", this.i18n.getMessage('input.optional'), ")"))))), h("div", { class: {
636
638
  'input-wrapper': true,
637
639
  'input-round': this.round,
638
640
  'input-disabled': this.disabled
639
641
  }, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && h("cat-icon", { icon: this.icon, class: "icon-prefix", size: "l" }), h("div", { class: "input-inner-wrapper" }, h("input", { ref: el => (this.input = el), id: this.id, class: {
640
642
  'has-clearable': this.clearable && !this.disabled
641
- }, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.max, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.inputValue, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), this.clearable && !this.disabled && this.inputValue && (h("cat-button", { class: "clearable", icon: "cross-circle-outlined", "icon-only": "true", size: "s", variant: "text", "a11y-label": this.i18n.getMessage('input.clear'), onClick: this.clear.bind(this) }))), this.icon && this.iconRight && h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l" }), this.textSuffix && (h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), this.hint && h("p", { class: "input-hint" }, this.hint)));
643
+ }, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.max, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), this.clearable && !this.disabled && this.value && (h("cat-button", { class: "clearable", icon: "cross-circle-outlined", "icon-only": "true", size: "s", variant: "text", "a11y-label": this.i18n.getMessage('input.clear'), onClick: this.clear.bind(this) }))), this.icon && this.iconRight && h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l" }), this.textSuffix && (h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), this.hintSection));
644
+ }
645
+ get hintSection() {
646
+ const hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
647
+ return ((this.hint || hasSlottedHint) && (h(CatFormHint, { hint: this.hint, slottedHint: hasSlottedHint && h("slot", { name: "hint" }) })));
642
648
  }
643
649
  onInput(event) {
644
- this.inputValue = this.input.value;
650
+ this.value = this.input.value;
645
651
  this.catChange.emit(event);
646
652
  }
647
653
  onFocus(event) {
@@ -650,9 +656,7 @@ const CatInput = class {
650
656
  onBlur(event) {
651
657
  this.catBlur.emit(event);
652
658
  }
653
- static get watchers() { return {
654
- "value": ["onValueChange"]
655
- }; }
659
+ get hostElement() { return getElement(this); }
656
660
  };
657
661
  CatInput.style = catInputCss;
658
662
 
@@ -2891,13 +2895,13 @@ const firstTabbable = (container) => {
2891
2895
 
2892
2896
  const catMenuCss = ":host{display:contents}:host([hidden]){display:none}.content{padding-top:0.5rem;padding-bottom:0.5rem;position:absolute;background:white;display:none;overflow:auto;-webkit-overflow-scrolling:touch;min-width:8rem;max-width:16rem;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:0.25rem;z-index:100}";
2893
2897
 
2894
- let nextUniqueId$3 = 0;
2898
+ let nextUniqueId$4 = 0;
2895
2899
  const CatMenu = class {
2896
2900
  constructor(hostRef) {
2897
2901
  registerInstance(this, hostRef);
2898
2902
  this.catOpen = createEvent(this, "catOpen", 7);
2899
2903
  this.catClose = createEvent(this, "catClose", 7);
2900
- this.id = nextUniqueId$3++;
2904
+ this.id = nextUniqueId$4++;
2901
2905
  /**
2902
2906
  * The placement of the menu.
2903
2907
  */
@@ -2992,16 +2996,17 @@ const CatMenu = class {
2992
2996
  CatMenu.OFFSET = 4;
2993
2997
  CatMenu.style = catMenuCss;
2994
2998
 
2995
- const catRadioCss = ":host{display:flex;margin-bottom:1rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;cursor:pointer}.radio{display:flex;position:relative}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid #d7dbe0;border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 32, 127, 138))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.is-disabled input{background-color:#f8f8fb}.is-disabled input:checked{border-color:#d7dbe0}.is-disabled .circle{background-color:#d7dbe0}";
2999
+ const catRadioCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;margin:0}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;cursor:pointer}.radio{display:flex;position:relative}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid #d7dbe0;border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 32, 127, 138))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.is-disabled input{background-color:#f8f8fb}.is-disabled input:checked{border-color:#d7dbe0}.is-disabled .circle{background-color:#d7dbe0}";
2996
3000
 
2997
- let nextUniqueId$2 = 0;
3001
+ let nextUniqueId$3 = 0;
2998
3002
  const CatRadio = class {
2999
3003
  constructor(hostRef) {
3000
3004
  registerInstance(this, hostRef);
3001
3005
  this.catChange = createEvent(this, "catChange", 7);
3002
3006
  this.catFocus = createEvent(this, "catFocus", 7);
3003
3007
  this.catBlur = createEvent(this, "catBlur", 7);
3004
- this.id = `cat-radio-${++nextUniqueId$2}`;
3008
+ this.id = `cat-radio-${++nextUniqueId$3}`;
3009
+ this.hasSlottedLabel = false;
3005
3010
  /**
3006
3011
  * Whether this radio is checked.
3007
3012
  */
@@ -3024,7 +3029,7 @@ const CatRadio = class {
3024
3029
  this.required = false;
3025
3030
  }
3026
3031
  componentWillRender() {
3027
- if (!this.label) {
3032
+ if (!this.label && !this.hostElement.querySelector('[slot="label"]')) {
3028
3033
  loglevel.error('[A11y] Missing ARIA label on radio', this);
3029
3034
  }
3030
3035
  }
@@ -3038,9 +3043,14 @@ const CatRadio = class {
3038
3043
  this.input.focus(options);
3039
3044
  }
3040
3045
  render() {
3041
- return (h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, h("span", { class: "radio" }, h("input", { ref: el => (this.input = el), id: this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onChange.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), h("span", { class: "circle" })), h("span", { class: "label", part: "label" }, this.label)));
3046
+ return (h(Host, null, h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, h("span", { class: "radio" }, h("input", { ref: el => (this.input = el), id: this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onChange.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), h("span", { class: "circle" })), h("span", { class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label)), this.hintSection));
3047
+ }
3048
+ get hintSection() {
3049
+ const hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
3050
+ return ((this.hint || hasSlottedHint) && (h(CatFormHint, { hint: this.hint, slottedHint: hasSlottedHint && h("slot", { name: "hint" }) })));
3042
3051
  }
3043
3052
  onChange(event) {
3053
+ this.value = this.input.value;
3044
3054
  this.catChange.emit(event);
3045
3055
  }
3046
3056
  onFocus(event) {
@@ -3049,6 +3059,7 @@ const CatRadio = class {
3049
3059
  onBlur(event) {
3050
3060
  this.catBlur.emit(event);
3051
3061
  }
3062
+ get hostElement() { return getElement(this); }
3052
3063
  };
3053
3064
  CatRadio.style = catRadioCss;
3054
3065
 
@@ -4451,6 +4462,107 @@ const CatSpinner = class {
4451
4462
  };
4452
4463
  CatSpinner.style = catSpinnerCss;
4453
4464
 
4465
+ const catTabCss = ":host{display:block}:host([hidden]){display:none}";
4466
+
4467
+ let nextUniqueId$2 = 0;
4468
+ const CatTab = class {
4469
+ constructor(hostRef) {
4470
+ registerInstance(this, hostRef);
4471
+ this.tabClick = createEvent(this, "tabClick", 7);
4472
+ /**
4473
+ * The label of the tab.
4474
+ */
4475
+ this.label = '';
4476
+ /**
4477
+ * Hide the actual button content and only display the tab.
4478
+ */
4479
+ this.iconOnly = false;
4480
+ /**
4481
+ * Display the icon on the right.
4482
+ */
4483
+ this.iconRight = false;
4484
+ /**
4485
+ * Specifies that the tab should be deactivated.
4486
+ */
4487
+ this.deactivated = false;
4488
+ }
4489
+ connectedCallback() {
4490
+ if (!this.hostElement.id) {
4491
+ this.hostElement.id = `cat-tab-${nextUniqueId$2++}`;
4492
+ }
4493
+ }
4494
+ onClick(event) {
4495
+ this.tabClick.emit(event);
4496
+ }
4497
+ render() {
4498
+ return h(Host, null);
4499
+ }
4500
+ get hostElement() { return getElement(this); }
4501
+ };
4502
+ CatTab.style = catTabCss;
4503
+
4504
+ const catTabsCss = ":host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 #d7dbe0}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.tab{padding:0.5rem}.tab.tab-active{box-shadow:inset 0 -3px 0 0 #207f8a}";
4505
+
4506
+ const CatTabs = class {
4507
+ constructor(hostRef) {
4508
+ registerInstance(this, hostRef);
4509
+ this.tabs = [];
4510
+ this.buttons = [];
4511
+ /**
4512
+ * The ID of the active tab.
4513
+ */
4514
+ this.activeTab = '';
4515
+ /**
4516
+ * The alignment of the tabs.
4517
+ */
4518
+ this.tabsAlign = 'left';
4519
+ }
4520
+ onActiveTabChanged(newActiveTab) {
4521
+ const activeTab = this.tabs.find(value => value.id === newActiveTab);
4522
+ activeTab === null || activeTab === void 0 ? void 0 : activeTab.click();
4523
+ }
4524
+ componentWillLoad() {
4525
+ this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));
4526
+ if (this.tabs.length) {
4527
+ this.activeTabId = this.activeTab;
4528
+ }
4529
+ }
4530
+ onKeydown(event) {
4531
+ var _a;
4532
+ if (['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(event.key)) {
4533
+ const targetElements = this.buttons.filter(button => !button.disabled);
4534
+ const activeElement = (_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement;
4535
+ const activeIdx = activeElement ? targetElements.indexOf(activeElement) : -1;
4536
+ const activeOff = ['ArrowDown', 'ArrowRight'].includes(event.key) ? 1 : -1;
4537
+ const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;
4538
+ targetElements[targetIdx].setFocus();
4539
+ event.preventDefault();
4540
+ }
4541
+ }
4542
+ render() {
4543
+ return (h(Host, null, this.tabs.map((tab) => {
4544
+ return (h("cat-button", { ref: el => el && this.updateButtonsRef(el), buttonId: tab.id, role: "tab", part: "tab", class: {
4545
+ tab: true,
4546
+ 'tab-active': Boolean(this.activeTabId && tab.id === this.activeTabId)
4547
+ }, color: this.activeTabId && tab.id === this.activeTabId ? 'primary' : 'secondary', variant: "text", icon: tab.icon, iconOnly: tab.iconOnly, iconRight: tab.iconRight, url: tab.url, disabled: tab.deactivated, urlTarget: tab.urlTarget, onCatClick: () => (this.activeTabId = tab.id) }, tab.label));
4548
+ })));
4549
+ }
4550
+ updateButtonsRef(button) {
4551
+ const indexOf = this.buttons.indexOf(button);
4552
+ if (indexOf >= 0) {
4553
+ this.buttons[indexOf] = button;
4554
+ }
4555
+ else {
4556
+ this.buttons.push(button);
4557
+ }
4558
+ }
4559
+ get hostElement() { return getElement(this); }
4560
+ static get watchers() { return {
4561
+ "activeTabId": ["onActiveTabChanged"]
4562
+ }; }
4563
+ };
4564
+ CatTabs.style = catTabsCss;
4565
+
4454
4566
  const catToastDemoCss = ":host{display:block}";
4455
4567
 
4456
4568
  const CatToastDemo = class {
@@ -4494,7 +4606,7 @@ const CatToastDemo = class {
4494
4606
  };
4495
4607
  CatToastDemo.style = catToastDemoCss;
4496
4608
 
4497
- const catToggleCss = ":host{display:flex;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}input{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:#d7dbe0;transition:background-color 0.13s ease}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 32, 127, 138))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:\"\";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 0.13s linear;box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
4609
+ const catToggleCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;margin:0}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}input{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:#d7dbe0;transition:background-color 0.13s ease}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 32, 127, 138))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:\"\";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 0.13s linear;box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
4498
4610
 
4499
4611
  let nextUniqueId$1 = 0;
4500
4612
  const CatToggle = class {
@@ -4504,6 +4616,7 @@ const CatToggle = class {
4504
4616
  this.catFocus = createEvent(this, "catFocus", 7);
4505
4617
  this.catBlur = createEvent(this, "catBlur", 7);
4506
4618
  this.id = `cat-toggle-${nextUniqueId$1++}`;
4619
+ this.hasSlottedLabel = false;
4507
4620
  /**
4508
4621
  * Checked state of the toggle.
4509
4622
  */
@@ -4526,7 +4639,7 @@ const CatToggle = class {
4526
4639
  this.required = false;
4527
4640
  }
4528
4641
  componentWillRender() {
4529
- if (!this.label) {
4642
+ if (!this.label && !this.hostElement.querySelector('[slot="label"]')) {
4530
4643
  loglevel.error('[A11y] Missing ARIA label on toggle', this);
4531
4644
  }
4532
4645
  }
@@ -4540,9 +4653,14 @@ const CatToggle = class {
4540
4653
  this.input.focus(options);
4541
4654
  }
4542
4655
  render() {
4543
- return (h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, h("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) }), h("span", { class: "toggle", part: "toggle" }), h("span", { class: "label", part: "label" }, this.label)));
4656
+ return (h(Host, null, h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, h("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) }), h("span", { class: "toggle", part: "toggle" }), h("span", { class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label)), this.hintSection));
4657
+ }
4658
+ get hintSection() {
4659
+ const hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
4660
+ return ((this.hint || hasSlottedHint) && (h(CatFormHint, { hint: this.hint, slottedHint: hasSlottedHint && h("slot", { name: "hint" }) })));
4544
4661
  }
4545
4662
  onInput(event) {
4663
+ this.value = this.input.value;
4546
4664
  this.catChange.emit(event);
4547
4665
  }
4548
4666
  onFocus(event) {
@@ -4551,6 +4669,7 @@ const CatToggle = class {
4551
4669
  onBlur(event) {
4552
4670
  this.catBlur.emit(event);
4553
4671
  }
4672
+ get hostElement() { return getElement(this); }
4554
4673
  };
4555
4674
  CatToggle.style = catToggleCss;
4556
4675
 
@@ -4602,6 +4721,7 @@ const CatTooltip = class {
4602
4721
  autoUpdate(this.trigger, this.tooltip, () => this.update());
4603
4722
  }
4604
4723
  if (isTouchDevice) {
4724
+ window.addEventListener('touchstart', this.windowTouchStartListener.bind(this));
4605
4725
  (_b = this.trigger) === null || _b === void 0 ? void 0 : _b.addEventListener('touchstart', this.touchStartListener.bind(this));
4606
4726
  (_c = this.trigger) === null || _c === void 0 ? void 0 : _c.addEventListener('touchend', this.touchEndListener.bind(this));
4607
4727
  }
@@ -4615,6 +4735,7 @@ const CatTooltip = class {
4615
4735
  disconnectedCallback() {
4616
4736
  var _a, _b, _c, _d, _e, _f;
4617
4737
  if (isTouchDevice) {
4738
+ window.removeEventListener('touchstart', this.windowTouchStartListener.bind(this));
4618
4739
  (_a = this.trigger) === null || _a === void 0 ? void 0 : _a.removeEventListener('touchstart', this.touchStartListener.bind(this));
4619
4740
  (_b = this.trigger) === null || _b === void 0 ? void 0 : _b.removeEventListener('touchend', this.touchEndListener.bind(this));
4620
4741
  }
@@ -4649,34 +4770,37 @@ const CatTooltip = class {
4649
4770
  showListener() {
4650
4771
  window.clearTimeout(this.hideTimeout);
4651
4772
  this.showTimeout = window.setTimeout(() => {
4652
- var _a, _b;
4653
- (_a = this.trigger) === null || _a === void 0 ? void 0 : _a.focus();
4654
- (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.classList.add('tooltip-show');
4773
+ var _a;
4774
+ (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.classList.add('tooltip-show');
4655
4775
  }, this.showDelay);
4656
4776
  }
4657
4777
  hideListener() {
4658
4778
  window.clearTimeout(this.showTimeout);
4659
4779
  this.hideTimeout = window.setTimeout(() => {
4660
- var _a, _b;
4661
- (_a = this.trigger) === null || _a === void 0 ? void 0 : _a.blur();
4662
- (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.classList.remove('tooltip-show');
4780
+ var _a;
4781
+ (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.classList.remove('tooltip-show');
4663
4782
  }, this.hideDelay);
4664
4783
  }
4665
- touchStartListener() {
4784
+ touchStartListener(event) {
4785
+ event.stopPropagation();
4666
4786
  this.touchTimeout = window.setTimeout(() => {
4667
4787
  var _a;
4668
4788
  (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.classList.add('tooltip-show');
4669
4789
  }, this.longTouchDuration);
4670
4790
  }
4671
4791
  touchEndListener() {
4792
+ if (this.touchTimeout) {
4793
+ window.clearTimeout(this.touchTimeout);
4794
+ }
4795
+ }
4796
+ windowTouchStartListener() {
4672
4797
  var _a;
4673
- window.clearTimeout(this.touchTimeout);
4674
4798
  (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.classList.remove('tooltip-show');
4675
4799
  }
4676
4800
  };
4677
4801
  CatTooltip.OFFSET = 4;
4678
4802
  CatTooltip.style = catTooltipCss;
4679
4803
 
4680
- export { CatAlert as cat_alert, CatAvatar as cat_avatar, CatBadge as cat_badge, CatButton as cat_button, CatCard as cat_card, CatCheckbox as cat_checkbox, CatIcon as cat_icon, CatInput as cat_input, CatMenu as cat_menu, CatRadio as cat_radio, CatScrollable as cat_scrollable, CatSkeleton as cat_skeleton, CatSpinner as cat_spinner, CatToastDemo as cat_toast_demo, CatToggle as cat_toggle, CatTooltip as cat_tooltip };
4804
+ export { CatAlert as cat_alert, CatAvatar as cat_avatar, CatBadge as cat_badge, CatButton as cat_button, CatCard as cat_card, CatCheckbox as cat_checkbox, CatIcon as cat_icon, CatInput as cat_input, CatMenu as cat_menu, CatRadio as cat_radio, CatScrollable as cat_scrollable, CatSkeleton as cat_skeleton, CatSpinner as cat_spinner, CatTab as cat_tab, CatTabs as cat_tabs, CatToastDemo as cat_toast_demo, CatToggle as cat_toggle, CatTooltip as cat_tooltip };
4681
4805
 
4682
- //# sourceMappingURL=cat-alert_16.entry.js.map
4806
+ //# sourceMappingURL=cat-alert_18.entry.js.map