@haiilo/catalyst 0.5.12 → 0.5.13

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 (79) hide show
  1. package/dist/catalyst/catalyst.css +7 -1
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/index.esm.js +1 -1
  5. package/dist/catalyst/{p-e82b63e9.js → p-12486027.js} +2 -2
  6. package/dist/catalyst/{p-e82b63e9.js.map → p-12486027.js.map} +0 -0
  7. package/dist/catalyst/p-2ec5c87a.js +2 -0
  8. package/dist/catalyst/p-2ec5c87a.js.map +1 -0
  9. package/dist/catalyst/p-7c06183a.js +2 -0
  10. package/dist/catalyst/p-7c06183a.js.map +1 -0
  11. package/dist/catalyst/p-a8629c54.entry.js +2 -0
  12. package/dist/catalyst/p-a8629c54.entry.js.map +1 -0
  13. package/dist/catalyst/p-c7f3b231.js +10 -0
  14. package/dist/catalyst/p-c7f3b231.js.map +1 -0
  15. package/dist/catalyst/p-e6491f33.entry.js +10 -0
  16. package/dist/catalyst/p-e6491f33.entry.js.map +1 -0
  17. package/dist/cjs/{app-globals-2a30d681.js → app-globals-aa29ad72.js} +2 -2
  18. package/dist/cjs/{app-globals-2a30d681.js.map → app-globals-aa29ad72.js.map} +1 -1
  19. package/dist/cjs/cat-alert_15.cjs.entry.js +52 -88
  20. package/dist/cjs/cat-alert_15.cjs.entry.js.map +1 -1
  21. package/dist/cjs/cat-icon-registry-49b11b51.js +131 -0
  22. package/dist/cjs/cat-icon-registry-49b11b51.js.map +1 -0
  23. package/dist/cjs/cat-notification-156f4cf5.js +552 -0
  24. package/dist/cjs/cat-notification-156f4cf5.js.map +1 -0
  25. package/dist/cjs/cat-textarea.cjs.entry.js +91 -0
  26. package/dist/cjs/cat-textarea.cjs.entry.js.map +1 -0
  27. package/dist/cjs/catalyst.cjs.js +4 -3
  28. package/dist/cjs/catalyst.cjs.js.map +1 -1
  29. package/dist/cjs/index.cjs.js +4 -1
  30. package/dist/cjs/index.cjs.js.map +1 -1
  31. package/dist/cjs/loader.cjs.js +4 -3
  32. package/dist/cjs/loader.cjs.js.map +1 -1
  33. package/dist/cjs/{cat-icon-registry-b3a95a6b.js → loglevel-c9b2d01f.js} +3 -126
  34. package/dist/cjs/loglevel-c9b2d01f.js.map +1 -0
  35. package/dist/collection/collection-manifest.json +1 -0
  36. package/dist/collection/components/cat-notification/cat-notification.js +106 -0
  37. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -0
  38. package/dist/collection/components/cat-toast-demo/cat-toast-demo.css +3 -0
  39. package/dist/collection/components/cat-toast-demo/cat-toast-demo.js +51 -0
  40. package/dist/collection/components/cat-toast-demo/cat-toast-demo.js.map +1 -0
  41. package/dist/collection/index.js +1 -0
  42. package/dist/collection/index.js.map +1 -1
  43. package/dist/components/cat-notification.js +550 -0
  44. package/dist/components/cat-notification.js.map +1 -0
  45. package/dist/components/cat-toast-demo.d.ts +11 -0
  46. package/dist/components/cat-toast-demo.js +84 -0
  47. package/dist/components/cat-toast-demo.js.map +1 -0
  48. package/dist/components/index.js +1 -0
  49. package/dist/components/index.js.map +1 -1
  50. package/dist/components/loglevel.js +1 -1
  51. package/dist/esm/{app-globals-77cd8c8e.js → app-globals-cf55f7f5.js} +2 -2
  52. package/dist/esm/{app-globals-77cd8c8e.js.map → app-globals-cf55f7f5.js.map} +1 -1
  53. package/dist/esm/cat-alert_15.entry.js +46 -82
  54. package/dist/esm/cat-alert_15.entry.js.map +1 -1
  55. package/dist/esm/cat-icon-registry-3ea75755.js +128 -0
  56. package/dist/esm/cat-icon-registry-3ea75755.js.map +1 -0
  57. package/dist/esm/cat-notification-cd98c266.js +550 -0
  58. package/dist/esm/cat-notification-cd98c266.js.map +1 -0
  59. package/dist/esm/cat-textarea.entry.js +87 -0
  60. package/dist/esm/cat-textarea.entry.js.map +1 -0
  61. package/dist/esm/catalyst.js +4 -3
  62. package/dist/esm/catalyst.js.map +1 -1
  63. package/dist/esm/index.js +3 -1
  64. package/dist/esm/index.js.map +1 -1
  65. package/dist/esm/loader.js +4 -3
  66. package/dist/esm/loader.js.map +1 -1
  67. package/dist/esm/{cat-icon-registry-a7acd6f7.js → loglevel-39a9e3f9.js} +2 -125
  68. package/dist/esm/loglevel-39a9e3f9.js.map +1 -0
  69. package/dist/types/components/cat-notification/cat-notification.d.ts +51 -0
  70. package/dist/types/components/cat-toast-demo/cat-toast-demo.d.ts +9 -0
  71. package/dist/types/components.d.ts +13 -0
  72. package/dist/types/index.d.ts +1 -0
  73. package/package.json +5 -3
  74. package/dist/catalyst/p-9a3c2375.js +0 -2
  75. package/dist/catalyst/p-9a3c2375.js.map +0 -1
  76. package/dist/catalyst/p-a6b8ebe9.entry.js +0 -10
  77. package/dist/catalyst/p-a6b8ebe9.entry.js.map +0 -1
  78. package/dist/cjs/cat-icon-registry-b3a95a6b.js.map +0 -1
  79. package/dist/esm/cat-icon-registry-a7acd6f7.js.map +0 -1
@@ -1,5 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, c as createEvent } from './index-fd12be19.js';
2
- import { l as loglevel, C as CatIconRegistry, a as CatI18nRegistry } from './cat-icon-registry-a7acd6f7.js';
2
+ import { l as loglevel } from './loglevel-39a9e3f9.js';
3
+ import { C as CatIconRegistry, a as CatI18nRegistry } from './cat-icon-registry-3ea75755.js';
4
+ import { N as NotificationsService } from './cat-notification-cd98c266.js';
3
5
 
4
6
  const catAlertCss = ":host{display:block;margin-bottom:1rem}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host([hidden]){display:none}.alert{font:inherit;color:rgb(var(--text));background-color:rgba(var(--bg), 0.1);box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);border-radius:0.25rem;padding:0.75rem 1rem}::slotted(:last-child){margin-bottom:0 !important}.alert-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.alert-secondary{--bg:105, 118, 135;--text:0, 0, 0;--border:105, 118, 135}.alert-success{--bg:0, 132, 88;--text:0, 132, 88;--border:0, 132, 88}.alert-warning{--bg:255, 206, 128;--text:159, 97, 0;--border:159, 97, 0}.alert-danger{--bg:217, 52, 13;--text:217, 52, 13;--border:217, 52, 13}";
5
7
 
@@ -374,14 +376,14 @@ CatCard.style = catCardCss;
374
376
 
375
377
  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))}";
376
378
 
377
- let nextUniqueId$6 = 0;
379
+ let nextUniqueId$5 = 0;
378
380
  const CatCheckbox = class {
379
381
  constructor(hostRef) {
380
382
  registerInstance(this, hostRef);
381
383
  this.catChange = createEvent(this, "catChange", 7);
382
384
  this.catFocus = createEvent(this, "catFocus", 7);
383
385
  this.catBlur = createEvent(this, "catBlur", 7);
384
- this.id = `cat-checkbox-${nextUniqueId$6++}`;
386
+ this.id = `cat-checkbox-${nextUniqueId$5++}`;
385
387
  /**
386
388
  * Checked state of the checkbox
387
389
  */
@@ -467,7 +469,7 @@ CatIcon.style = catIconCss;
467
469
 
468
470
  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}";
469
471
 
470
- let nextUniqueId$5 = 0;
472
+ let nextUniqueId$4 = 0;
471
473
  const CatInput = class {
472
474
  constructor(hostRef) {
473
475
  registerInstance(this, hostRef);
@@ -475,7 +477,7 @@ const CatInput = class {
475
477
  this.catFocus = createEvent(this, "catFocus", 7);
476
478
  this.catBlur = createEvent(this, "catBlur", 7);
477
479
  this.i18n = CatI18nRegistry.getInstance();
478
- this.id = `cat-input-${nextUniqueId$5++}`;
480
+ this.id = `cat-input-${nextUniqueId$4++}`;
479
481
  this.inputValue = '';
480
482
  /**
481
483
  * Whether the input should show a clear button.
@@ -2804,13 +2806,13 @@ const firstTabbable = (container) => {
2804
2806
 
2805
2807
  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}";
2806
2808
 
2807
- let nextUniqueId$4 = 0;
2809
+ let nextUniqueId$3 = 0;
2808
2810
  const CatMenu = class {
2809
2811
  constructor(hostRef) {
2810
2812
  registerInstance(this, hostRef);
2811
2813
  this.catOpen = createEvent(this, "catOpen", 7);
2812
2814
  this.catClose = createEvent(this, "catClose", 7);
2813
- this.id = nextUniqueId$4++;
2815
+ this.id = nextUniqueId$3++;
2814
2816
  /**
2815
2817
  * The placement of the menu.
2816
2818
  */
@@ -2907,14 +2909,14 @@ CatMenu.style = catMenuCss;
2907
2909
 
2908
2910
  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}";
2909
2911
 
2910
- let nextUniqueId$3 = 0;
2912
+ let nextUniqueId$2 = 0;
2911
2913
  const CatRadio = class {
2912
2914
  constructor(hostRef) {
2913
2915
  registerInstance(this, hostRef);
2914
2916
  this.catChange = createEvent(this, "catChange", 7);
2915
2917
  this.catFocus = createEvent(this, "catFocus", 7);
2916
2918
  this.catBlur = createEvent(this, "catBlur", 7);
2917
- this.id = `cat-radio-${++nextUniqueId$3}`;
2919
+ this.id = `cat-radio-${++nextUniqueId$2}`;
2918
2920
  /**
2919
2921
  * Whether this radio is checked.
2920
2922
  */
@@ -4364,86 +4366,48 @@ const CatSpinner = class {
4364
4366
  };
4365
4367
  CatSpinner.style = catSpinnerCss;
4366
4368
 
4367
- var e,t,n="function"==typeof Map?new Map:(e=[],t=[],{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,o){-1===e.indexOf(n)&&(e.push(n),t.push(o));},delete:function(n){var o=e.indexOf(n);o>-1&&(e.splice(o,1),t.splice(o,1));}}),o=function(e){return new Event(e,{bubbles:!0})};try{new Event("test");}catch(e){o=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t};}function r(e){var t=n.get(e);t&&t.destroy();}function i(e){var t=n.get(e);t&&t.update();}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var t,r=null,i=null,l=null,d=function(){e.clientWidth!==i&&c();},a=function(t){window.removeEventListener("resize",d,!1),e.removeEventListener("input",c,!1),e.removeEventListener("keyup",c,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",c,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n];}),n.delete(e);}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",c,!1),window.addEventListener("resize",d,!1),e.addEventListener("input",c,!1),e.addEventListener("autosize:update",c,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:a,update:c}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),r="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(r)&&(r=0),c();}function u(t){var n=e.style.width;e.style.width="0px",e.style.width=n,e.style.overflowY=t;}function s(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+r+"px",i=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop;}),n&&(document.documentElement.scrollTop=n);}}function c(){s();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(u("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==r){l=r;var i=o("autosize:resized");try{e.dispatchEvent(i);}catch(e){}}}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e});var d=l;
4368
-
4369
- const catTextareaCss = ":host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;margin-bottom:1rem}:host([hidden]){display:none}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))}textarea{margin:0;padding:0.625rem 0.75rem;min-height:2.5rem;font:inherit;background:white;border-radius:0.25rem;border:none;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear}textarea:disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));resize:none}textarea:hover:not(:disabled){box-shadow:0 0 0 2px #d7dbe0}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.input-hint{font-size:0.875rem;line-height:1rem;margin:0}";
4369
+ const catToastDemoCss = ":host{display:block}";
4370
4370
 
4371
- let nextUniqueId$2 = 0;
4372
- const CatTextarea = class {
4371
+ const CatToastDemo = class {
4373
4372
  constructor(hostRef) {
4374
4373
  registerInstance(this, hostRef);
4375
- this.catChange = createEvent(this, "catChange", 7);
4376
- this.catFocus = createEvent(this, "catFocus", 7);
4377
- this.catBlur = createEvent(this, "catBlur", 7);
4378
- this.id = `cat-textarea-${nextUniqueId$2++}`;
4379
- /**
4380
- * Whether the textarea is disabled.
4381
- */
4382
- this.disabled = false;
4383
- /**
4384
- * The label for the textarea.
4385
- */
4386
- this.label = '';
4387
- /**
4388
- * Visually hide the label, but still show it to assistive technologies like screen readers.
4389
- */
4390
- this.labelHidden = false;
4391
- /**
4392
- * The name of the form control. Submitted with the form as part of a name/value pair.
4393
- */
4394
- this.name = '';
4395
- /**
4396
- * The value is not editable.
4397
- */
4398
- this.readonly = false;
4399
- /**
4400
- * A value is required or must be check for the form to be submittable.
4401
- */
4402
- this.required = false;
4403
- /**
4404
- * Specifies the initial number of lines in the textarea.
4405
- */
4406
- this.rows = 3;
4407
4374
  }
4408
- componentWillRender() {
4409
- if (!this.label) {
4410
- loglevel.error('[A11y] Missing ARIA label on textarea', this);
4411
- }
4412
- }
4413
- componentDidLoad() {
4414
- d(this.textarea);
4415
- }
4416
- /**
4417
- * Sets focus on the textarea. Use this method instead of `textarea.focus()`.
4418
- *
4419
- * @param options An optional object providing options to control aspects of
4420
- * the focusing process.
4421
- */
4422
- async setFocus(options) {
4423
- this.textarea.focus(options);
4424
- }
4425
- // /**
4426
- // * Clear the input.
4427
- // */
4428
- // @Method()
4429
- // async clear(): Promise<void> {
4430
- // this.inputValue = '';
4431
- // }
4432
4375
  render() {
4433
- 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" }, "(Optional)"))))), h("textarea", { ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), this.hint && h("p", { class: "input-hint" }, this.hint)));
4434
- }
4435
- onInput(event) {
4436
- // this.inputValue = πthis.input.value;
4437
- this.catChange.emit(event);
4438
- }
4439
- onFocus(event) {
4440
- this.catFocus.emit(event);
4376
+ return h("cat-button", { onClick: this.onClick.bind(this) }, "Show Notifications");
4441
4377
  }
4442
- onBlur(event) {
4443
- this.catBlur.emit(event);
4378
+ onClick() {
4379
+ const infoOptions = {
4380
+ position: 'top-left'
4381
+ };
4382
+ const errorOptions = {
4383
+ position: 'top-center',
4384
+ type: 'error'
4385
+ };
4386
+ const errorOptions2 = {
4387
+ position: 'bottom-left',
4388
+ type: 'error'
4389
+ };
4390
+ const successOptions3 = {
4391
+ position: 'bottom-right',
4392
+ type: 'success'
4393
+ };
4394
+ const template = document.createElement('template');
4395
+ template.innerHTML = `<div style="padding: 7px 30px 7px 10px">Custom HTML Node Content</div>`;
4396
+ const successOptions4 = {
4397
+ position: 'bottom-right',
4398
+ type: 'success',
4399
+ content: template.content.firstChild
4400
+ };
4401
+ NotificationsService.error('Default Click');
4402
+ NotificationsService.error('Long default title, long default title, long default title, long default title');
4403
+ NotificationsService.info('Info Click', 'Info message', infoOptions);
4404
+ NotificationsService.success('', ' ', successOptions4);
4405
+ NotificationsService.error('Error Title', ' ', errorOptions);
4406
+ NotificationsService.error('Error 2 Title', 'Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message, Very long message,Very long message, Very long message, Very long message, Very long message, Very long message, ', errorOptions2);
4407
+ NotificationsService.success('Success Title - very long title without message', ' ', successOptions3);
4444
4408
  }
4445
4409
  };
4446
- CatTextarea.style = catTextareaCss;
4410
+ CatToastDemo.style = catToastDemoCss;
4447
4411
 
4448
4412
  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))}";
4449
4413
 
@@ -4628,6 +4592,6 @@ const CatTooltip = class {
4628
4592
  CatTooltip.OFFSET = 4;
4629
4593
  CatTooltip.style = catTooltipCss;
4630
4594
 
4631
- export { CatAlert as cat_alert, 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, CatTextarea as cat_textarea, CatToggle as cat_toggle, CatTooltip as cat_tooltip };
4595
+ export { CatAlert as cat_alert, 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 };
4632
4596
 
4633
4597
  //# sourceMappingURL=cat-alert_15.entry.js.map