@haiilo/catalyst 0.5.10 → 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
@@ -3,7 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5d72f0e4.js');
6
- const catIconRegistry = require('./cat-icon-registry-b3a95a6b.js');
6
+ const loglevel = require('./loglevel-c9b2d01f.js');
7
+ const catIconRegistry = require('./cat-icon-registry-49b11b51.js');
8
+ const catNotification = require('./cat-notification-156f4cf5.js');
7
9
 
8
10
  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}";
9
11
 
@@ -183,7 +185,7 @@ function createEmptyStyleRule(query) {
183
185
  }
184
186
  }
185
187
  catch (e) {
186
- catIconRegistry.loglevel.error(e);
188
+ loglevel.loglevel.error(e);
187
189
  }
188
190
  }
189
191
 
@@ -268,7 +270,7 @@ const CatButton = class {
268
270
  }
269
271
  componentWillRender() {
270
272
  if (this.isIconButton && !this.a11yLabel) {
271
- catIconRegistry.loglevel.warn('[A11y] Missing ARIA label on icon button', this);
273
+ loglevel.loglevel.warn('[A11y] Missing ARIA label on icon button', this);
272
274
  }
273
275
  }
274
276
  haltDisabledEvents(event) {
@@ -378,14 +380,14 @@ CatCard.style = catCardCss;
378
380
 
379
381
  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))}";
380
382
 
381
- let nextUniqueId$6 = 0;
383
+ let nextUniqueId$5 = 0;
382
384
  const CatCheckbox = class {
383
385
  constructor(hostRef) {
384
386
  index.registerInstance(this, hostRef);
385
387
  this.catChange = index.createEvent(this, "catChange", 7);
386
388
  this.catFocus = index.createEvent(this, "catFocus", 7);
387
389
  this.catBlur = index.createEvent(this, "catBlur", 7);
388
- this.id = `cat-checkbox-${nextUniqueId$6++}`;
390
+ this.id = `cat-checkbox-${nextUniqueId$5++}`;
389
391
  /**
390
392
  * Checked state of the checkbox
391
393
  */
@@ -418,7 +420,7 @@ const CatCheckbox = class {
418
420
  }
419
421
  componentWillRender() {
420
422
  if (!this.label) {
421
- catIconRegistry.loglevel.error('[A11y] Missing ARIA label on checkbox', this);
423
+ loglevel.loglevel.error('[A11y] Missing ARIA label on checkbox', this);
422
424
  }
423
425
  }
424
426
  /**
@@ -471,7 +473,7 @@ CatIcon.style = catIconCss;
471
473
 
472
474
  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}";
473
475
 
474
- let nextUniqueId$5 = 0;
476
+ let nextUniqueId$4 = 0;
475
477
  const CatInput = class {
476
478
  constructor(hostRef) {
477
479
  index.registerInstance(this, hostRef);
@@ -479,7 +481,7 @@ const CatInput = class {
479
481
  this.catFocus = index.createEvent(this, "catFocus", 7);
480
482
  this.catBlur = index.createEvent(this, "catBlur", 7);
481
483
  this.i18n = catIconRegistry.CatI18nRegistry.getInstance();
482
- this.id = `cat-input-${nextUniqueId$5++}`;
484
+ this.id = `cat-input-${nextUniqueId$4++}`;
483
485
  this.inputValue = '';
484
486
  /**
485
487
  * Whether the input should show a clear button.
@@ -530,7 +532,7 @@ const CatInput = class {
530
532
  }
531
533
  componentWillRender() {
532
534
  if (!this.label) {
533
- catIconRegistry.loglevel.error('[A11y] Missing ARIA label on input', this);
535
+ loglevel.loglevel.error('[A11y] Missing ARIA label on input', this);
534
536
  }
535
537
  }
536
538
  /**
@@ -2808,13 +2810,13 @@ const firstTabbable = (container) => {
2808
2810
 
2809
2811
  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}";
2810
2812
 
2811
- let nextUniqueId$4 = 0;
2813
+ let nextUniqueId$3 = 0;
2812
2814
  const CatMenu = class {
2813
2815
  constructor(hostRef) {
2814
2816
  index.registerInstance(this, hostRef);
2815
2817
  this.catOpen = index.createEvent(this, "catOpen", 7);
2816
2818
  this.catClose = index.createEvent(this, "catClose", 7);
2817
- this.id = nextUniqueId$4++;
2819
+ this.id = nextUniqueId$3++;
2818
2820
  /**
2819
2821
  * The placement of the menu.
2820
2822
  */
@@ -2911,14 +2913,14 @@ CatMenu.style = catMenuCss;
2911
2913
 
2912
2914
  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}";
2913
2915
 
2914
- let nextUniqueId$3 = 0;
2916
+ let nextUniqueId$2 = 0;
2915
2917
  const CatRadio = class {
2916
2918
  constructor(hostRef) {
2917
2919
  index.registerInstance(this, hostRef);
2918
2920
  this.catChange = index.createEvent(this, "catChange", 7);
2919
2921
  this.catFocus = index.createEvent(this, "catFocus", 7);
2920
2922
  this.catBlur = index.createEvent(this, "catBlur", 7);
2921
- this.id = `cat-radio-${++nextUniqueId$3}`;
2923
+ this.id = `cat-radio-${++nextUniqueId$2}`;
2922
2924
  /**
2923
2925
  * Whether this radio is checked.
2924
2926
  */
@@ -2942,7 +2944,7 @@ const CatRadio = class {
2942
2944
  }
2943
2945
  componentWillRender() {
2944
2946
  if (!this.label) {
2945
- catIconRegistry.loglevel.error('[A11y] Missing ARIA label on radio', this);
2947
+ loglevel.loglevel.error('[A11y] Missing ARIA label on radio', this);
2946
2948
  }
2947
2949
  }
2948
2950
  /**
@@ -4368,86 +4370,48 @@ const CatSpinner = class {
4368
4370
  };
4369
4371
  CatSpinner.style = catSpinnerCss;
4370
4372
 
4371
- 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;
4372
-
4373
- 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}";
4373
+ const catToastDemoCss = ":host{display:block}";
4374
4374
 
4375
- let nextUniqueId$2 = 0;
4376
- const CatTextarea = class {
4375
+ const CatToastDemo = class {
4377
4376
  constructor(hostRef) {
4378
4377
  index.registerInstance(this, hostRef);
4379
- this.catChange = index.createEvent(this, "catChange", 7);
4380
- this.catFocus = index.createEvent(this, "catFocus", 7);
4381
- this.catBlur = index.createEvent(this, "catBlur", 7);
4382
- this.id = `cat-textarea-${nextUniqueId$2++}`;
4383
- /**
4384
- * Whether the textarea is disabled.
4385
- */
4386
- this.disabled = false;
4387
- /**
4388
- * The label for the textarea.
4389
- */
4390
- this.label = '';
4391
- /**
4392
- * Visually hide the label, but still show it to assistive technologies like screen readers.
4393
- */
4394
- this.labelHidden = false;
4395
- /**
4396
- * The name of the form control. Submitted with the form as part of a name/value pair.
4397
- */
4398
- this.name = '';
4399
- /**
4400
- * The value is not editable.
4401
- */
4402
- this.readonly = false;
4403
- /**
4404
- * A value is required or must be check for the form to be submittable.
4405
- */
4406
- this.required = false;
4407
- /**
4408
- * Specifies the initial number of lines in the textarea.
4409
- */
4410
- this.rows = 3;
4411
4378
  }
4412
- componentWillRender() {
4413
- if (!this.label) {
4414
- catIconRegistry.loglevel.error('[A11y] Missing ARIA label on textarea', this);
4415
- }
4416
- }
4417
- componentDidLoad() {
4418
- d(this.textarea);
4419
- }
4420
- /**
4421
- * Sets focus on the textarea. Use this method instead of `textarea.focus()`.
4422
- *
4423
- * @param options An optional object providing options to control aspects of
4424
- * the focusing process.
4425
- */
4426
- async setFocus(options) {
4427
- this.textarea.focus(options);
4428
- }
4429
- // /**
4430
- // * Clear the input.
4431
- // */
4432
- // @Method()
4433
- // async clear(): Promise<void> {
4434
- // this.inputValue = '';
4435
- // }
4436
4379
  render() {
4437
- return (index.h(index.Host, null, this.label && (index.h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, index.h("span", { part: "label" }, this.label, !this.required && (index.h("span", { class: "input-optional", "aria-hidden": "true" }, "(Optional)"))))), index.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 && index.h("p", { class: "input-hint" }, this.hint)));
4438
- }
4439
- onInput(event) {
4440
- // this.inputValue = πthis.input.value;
4441
- this.catChange.emit(event);
4442
- }
4443
- onFocus(event) {
4444
- this.catFocus.emit(event);
4380
+ return index.h("cat-button", { onClick: this.onClick.bind(this) }, "Show Notifications");
4445
4381
  }
4446
- onBlur(event) {
4447
- this.catBlur.emit(event);
4382
+ onClick() {
4383
+ const infoOptions = {
4384
+ position: 'top-left'
4385
+ };
4386
+ const errorOptions = {
4387
+ position: 'top-center',
4388
+ type: 'error'
4389
+ };
4390
+ const errorOptions2 = {
4391
+ position: 'bottom-left',
4392
+ type: 'error'
4393
+ };
4394
+ const successOptions3 = {
4395
+ position: 'bottom-right',
4396
+ type: 'success'
4397
+ };
4398
+ const template = document.createElement('template');
4399
+ template.innerHTML = `<div style="padding: 7px 30px 7px 10px">Custom HTML Node Content</div>`;
4400
+ const successOptions4 = {
4401
+ position: 'bottom-right',
4402
+ type: 'success',
4403
+ content: template.content.firstChild
4404
+ };
4405
+ catNotification.NotificationsService.error('Default Click');
4406
+ catNotification.NotificationsService.error('Long default title, long default title, long default title, long default title');
4407
+ catNotification.NotificationsService.info('Info Click', 'Info message', infoOptions);
4408
+ catNotification.NotificationsService.success('', ' ', successOptions4);
4409
+ catNotification.NotificationsService.error('Error Title', ' ', errorOptions);
4410
+ catNotification.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);
4411
+ catNotification.NotificationsService.success('Success Title - very long title without message', ' ', successOptions3);
4448
4412
  }
4449
4413
  };
4450
- CatTextarea.style = catTextareaCss;
4414
+ CatToastDemo.style = catToastDemoCss;
4451
4415
 
4452
4416
  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))}";
4453
4417
 
@@ -4482,7 +4446,7 @@ const CatToggle = class {
4482
4446
  }
4483
4447
  componentWillRender() {
4484
4448
  if (!this.label) {
4485
- catIconRegistry.loglevel.error('[A11y] Missing ARIA label on toggle', this);
4449
+ loglevel.loglevel.error('[A11y] Missing ARIA label on toggle', this);
4486
4450
  }
4487
4451
  }
4488
4452
  /**
@@ -4644,7 +4608,7 @@ exports.cat_radio = CatRadio;
4644
4608
  exports.cat_scrollable = CatScrollable;
4645
4609
  exports.cat_skeleton = CatSkeleton;
4646
4610
  exports.cat_spinner = CatSpinner;
4647
- exports.cat_textarea = CatTextarea;
4611
+ exports.cat_toast_demo = CatToastDemo;
4648
4612
  exports.cat_toggle = CatToggle;
4649
4613
  exports.cat_tooltip = CatTooltip;
4650
4614