@haiilo/catalyst 1.2.4 → 1.3.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 (82) hide show
  1. package/dist/catalyst/catalyst.css +1 -1
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/p-270fd91d.entry.js +2 -0
  5. package/dist/catalyst/{p-394f6b20.entry.js.map → p-270fd91d.entry.js.map} +1 -1
  6. package/dist/catalyst/p-3ad731e4.entry.js +2 -0
  7. package/dist/catalyst/p-3ad731e4.entry.js.map +1 -0
  8. package/dist/catalyst/p-692e49d6.js +3 -0
  9. package/dist/catalyst/p-692e49d6.js.map +1 -0
  10. package/dist/catalyst/scss/_variables.scss +2 -10
  11. package/dist/catalyst/scss/_variables.tokens.scss +2 -2
  12. package/dist/catalyst/scss/core/_base.scss +5 -1
  13. package/dist/catalyst/scss/core/_toast.scss +3 -3
  14. package/dist/catalyst/scss/core/_typography.scss +2 -17
  15. package/dist/catalyst/scss/index.scss +4 -4
  16. package/dist/catalyst/scss/utils/_typography.mixins.scss +9 -2
  17. package/dist/cjs/cat-alert_22.cjs.entry.js +174 -108
  18. package/dist/cjs/cat-alert_22.cjs.entry.js.map +1 -1
  19. package/dist/cjs/cat-modal.cjs.entry.js +2 -2
  20. package/dist/cjs/cat-modal.cjs.entry.js.map +1 -1
  21. package/dist/cjs/catalyst.cjs.js +3 -3
  22. package/dist/cjs/catalyst.cjs.js.map +1 -1
  23. package/dist/cjs/{index-8ab22379.js → index-b2134f1b.js} +13 -5
  24. package/dist/cjs/index-b2134f1b.js.map +1 -0
  25. package/dist/cjs/loader.cjs.js +3 -3
  26. package/dist/cjs/loader.cjs.js.map +1 -1
  27. package/dist/collection/collection-manifest.json +1 -1
  28. package/dist/collection/components/cat-button/cat-button.css +9 -5
  29. package/dist/collection/components/cat-checkbox/cat-checkbox.css +1 -1
  30. package/dist/collection/components/cat-input/cat-input.css +1 -1
  31. package/dist/collection/components/cat-menu/cat-menu.css +0 -2
  32. package/dist/collection/components/cat-menu/cat-menu.js +47 -14
  33. package/dist/collection/components/cat-menu/cat-menu.js.map +1 -1
  34. package/dist/collection/components/cat-radio/cat-radio.css +1 -1
  35. package/dist/collection/components/cat-scrollable/cat-scrollable.css +0 -2
  36. package/dist/collection/components/cat-select/cat-select.css +1 -1
  37. package/dist/collection/components/cat-select/cat-select.js +30 -28
  38. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  39. package/dist/collection/components/cat-select-demo/cat-select-demo.js +3 -3
  40. package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
  41. package/dist/collection/components/cat-textarea/cat-textarea.css +1 -1
  42. package/dist/collection/scss/_variables.scss +2 -10
  43. package/dist/collection/scss/core/_base.scss +5 -1
  44. package/dist/collection/scss/core/_toast.scss +3 -3
  45. package/dist/collection/scss/core/_typography.scss +2 -17
  46. package/dist/collection/scss/utils/_typography.mixins.scss +9 -2
  47. package/dist/components/cat-avatar2.js.map +1 -1
  48. package/dist/components/cat-button2.js +1 -1
  49. package/dist/components/cat-button2.js.map +1 -1
  50. package/dist/components/cat-checkbox2.js +1 -1
  51. package/dist/components/cat-input.js +1 -1
  52. package/dist/components/cat-menu.js +30 -14
  53. package/dist/components/cat-menu.js.map +1 -1
  54. package/dist/components/cat-radio.js +1 -1
  55. package/dist/components/cat-select-demo.js +2 -2
  56. package/dist/components/cat-select-demo.js.map +1 -1
  57. package/dist/components/cat-select2.js +31 -29
  58. package/dist/components/cat-select2.js.map +1 -1
  59. package/dist/components/cat-textarea.js +1 -1
  60. package/dist/components/floating-ui.dom.esm.js +106 -57
  61. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  62. package/dist/esm/cat-alert_22.entry.js +174 -108
  63. package/dist/esm/cat-alert_22.entry.js.map +1 -1
  64. package/dist/esm/cat-modal.entry.js +2 -2
  65. package/dist/esm/cat-modal.entry.js.map +1 -1
  66. package/dist/esm/catalyst.js +3 -3
  67. package/dist/esm/catalyst.js.map +1 -1
  68. package/dist/esm/{index-df195301.js → index-033048ed.js} +13 -6
  69. package/dist/esm/index-033048ed.js.map +1 -0
  70. package/dist/esm/loader.js +3 -3
  71. package/dist/esm/loader.js.map +1 -1
  72. package/dist/types/components/cat-menu/cat-menu.d.ts +5 -0
  73. package/dist/types/components/cat-select/cat-select.d.ts +4 -3
  74. package/dist/types/components.d.ts +8 -0
  75. package/package.json +16 -13
  76. package/dist/catalyst/p-394f6b20.entry.js +0 -2
  77. package/dist/catalyst/p-e7265b52.entry.js +0 -2
  78. package/dist/catalyst/p-e7265b52.entry.js.map +0 -1
  79. package/dist/catalyst/p-f80e3399.js +0 -3
  80. package/dist/catalyst/p-f80e3399.js.map +0 -1
  81. package/dist/cjs/index-8ab22379.js.map +0 -1
  82. package/dist/esm/index-df195301.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8ab22379.js');
5
+ const index = require('./index-b2134f1b.js');
6
6
  const catNotification = require('./cat-notification-bcb9fb86.js');
7
7
  const firstTabbable = require('./first-tabbable-7966cf1c.js');
8
8
 
@@ -293,7 +293,7 @@ function createEmptyStyleRule(query) {
293
293
  }
294
294
  }
295
295
 
296
- const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed;opacity:var(--cat-opacity-disabled, 0.65)}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:235, 236, 240;--fill:var(--cat-font-color-muted, 105, 118, 135)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 105, 118, 135);--text:var(--cat-font-color-muted, 105, 118, 135)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.05)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:none}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 105, 118, 135)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:none;background-color:rgba(var(--base), 0.05)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:none;background-color:rgba(var(--base), 0.1)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-catsecondary-text-active, 0, 0, 0)}.cat-button-success{--bg:var(--cat-success-bg-, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-catdanger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.25rem 0.25rem;font-size:0.875rem;line-height:1rem}.cat-button-xs .cat-button-prefix{margin-right:0.25rem}.cat-button-xs .cat-button-suffix{margin-left:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xs{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=xs]){margin:-0.25rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.25rem;margin-bottom:-0.25rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.25rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.25rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-s .cat-button-prefix{margin-right:0.25rem}.cat-button-s .cat-button-suffix{margin-left:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-s{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-m .cat-button-prefix{margin-right:0.25rem}.cat-button-m .cat-button-suffix{margin-left:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-m{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-l .cat-button-prefix{margin-right:0.25rem}.cat-button-l .cat-button-suffix{margin-left:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-l{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem}.cat-button-xl .cat-button-prefix{margin-right:0.25rem}.cat-button-xl .cat-button-suffix{margin-left:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xl{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0;justify-content:left}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
296
+ const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed;opacity:var(--cat-opacity-disabled, 0.65)}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:235, 236, 240;--fill:var(--cat-font-color-muted, 105, 118, 135)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 105, 118, 135);--text:var(--cat-font-color-muted, 105, 118, 135)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.05)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 105, 118, 135)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-button-decoration-hover, none);background-color:rgba(var(--base), 0.05)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-button-decoration-hover, none);background-color:rgba(var(--base), 0.1)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-success{--bg:var(--cat-success-bg-, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.25rem 0.25rem;font-size:0.875rem;line-height:1rem}.cat-button-xs .cat-button-prefix{margin-right:0.25rem}.cat-button-xs .cat-button-suffix{margin-left:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xs{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=xs]){margin:-0.25rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.25rem;margin-bottom:-0.25rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.25rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.25rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-s .cat-button-prefix{margin-right:0.25rem}.cat-button-s .cat-button-suffix{margin-left:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-s{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-m .cat-button-prefix{margin-right:0.25rem}.cat-button-m .cat-button-suffix{margin-left:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-m{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-l .cat-button-prefix{margin-right:0.25rem}.cat-button-l .cat-button-suffix{margin-left:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-l{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem}.cat-button-xl .cat-button-prefix{margin-right:0.25rem}.cat-button-xl .cat-button-suffix{margin-left:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xl{padding-left:1.25rem;padding-right:1.25rem}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host-context(cat-tabs) .cat-button{background-color:transparent !important}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0;justify-content:left}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
297
297
 
298
298
  const CatButton = class {
299
299
  constructor(hostRef) {
@@ -497,7 +497,7 @@ const CatFormHint = props => {
497
497
  ]));
498
498
  };
499
499
 
500
- 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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}: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;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 0.13s ease, border-color 0.13s ease;pointer-events:none}.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:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));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}.is-disabled .box{background-color:#f8f8fb;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 105, 118, 135))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.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))}";
500
+ 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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}: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;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 0.13s ease, border-color 0.13s ease;pointer-events:none}.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:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));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}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 105, 118, 135))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.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))}";
501
501
 
502
502
  let nextUniqueId$8 = 0;
503
503
  const CatCheckbox = class {
@@ -605,7 +605,7 @@ const CatIcon = class {
605
605
  };
606
606
  CatIcon.style = catIconCss;
607
607
 
608
- 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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);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:var(--cat-border-radius-m, 0.25rem);box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));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 rgb(var(--cat-border-color-dark, 215, 219, 224))}.input-wrapper:not(.input-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .input-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .input-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}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;font-weight:var(--cat-font-weight-body, 400);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 rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-inner-wrapper{display:flex;align-items:center;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}";
608
+ 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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);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:var(--cat-border-radius-m, 0.25rem);box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));transition:box-shadow 0.13s linear}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-disabled{background:#f2f4f7;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 rgb(var(--cat-border-color-dark, 215, 219, 224))}.input-wrapper:not(.input-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .input-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .input-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}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;font-weight:var(--cat-font-weight-body, 400);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 rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-inner-wrapper{display:flex;align-items:center;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}";
609
609
 
610
610
  let nextUniqueId$7 = 0;
611
611
  const CatInput = class {
@@ -813,9 +813,9 @@ const computePosition$1 = async (reference, floating, config) => {
813
813
  } = computeCoordsFromPlacement(rects, placement, rtl);
814
814
  let statefulPlacement = placement;
815
815
  let middlewareData = {};
816
+ let resetCount = 0;
816
817
 
817
818
  for (let i = 0; i < middleware.length; i++) {
818
-
819
819
  const {
820
820
  name,
821
821
  fn
@@ -847,7 +847,9 @@ const computePosition$1 = async (reference, floating, config) => {
847
847
  }
848
848
  };
849
849
 
850
- if (reset) {
850
+ if (reset && resetCount <= 50) {
851
+ resetCount++;
852
+
851
853
  if (typeof reset === 'object') {
852
854
  if (reset.placement) {
853
855
  statefulPlacement = reset.placement;
@@ -955,9 +957,7 @@ async function detectOverflow(middlewareArguments, options) {
955
957
  } : rects.reference,
956
958
  offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
957
959
  strategy
958
- }) : rects[elementContext]); // positive = overflowing the clipping rect
959
- // 0 or negative = within the clipping rect
960
-
960
+ }) : rects[elementContext]);
961
961
  return {
962
962
  top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
963
963
  bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
@@ -1122,19 +1122,19 @@ const flip = function (options) {
1122
1122
  };
1123
1123
  };
1124
1124
 
1125
- function convertValueToCoords(placement, rects, value, rtl) {
1126
- if (rtl === void 0) {
1127
- rtl = false;
1128
- }
1129
-
1125
+ async function convertValueToCoords(middlewareArguments, value) {
1126
+ const {
1127
+ placement,
1128
+ platform,
1129
+ elements
1130
+ } = middlewareArguments;
1131
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1130
1132
  const side = getSide(placement);
1131
1133
  const alignment = getAlignment(placement);
1132
1134
  const isVertical = getMainAxisFromPlacement(placement) === 'x';
1133
1135
  const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
1134
1136
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
1135
- const rawValue = typeof value === 'function' ? value({ ...rects,
1136
- placement
1137
- }) : value; // eslint-disable-next-line prefer-const
1137
+ const rawValue = typeof value === 'function' ? value(middlewareArguments) : value; // eslint-disable-next-line prefer-const
1138
1138
 
1139
1139
  let {
1140
1140
  mainAxis,
@@ -1180,13 +1180,9 @@ const offset = function (value) {
1180
1180
  async fn(middlewareArguments) {
1181
1181
  const {
1182
1182
  x,
1183
- y,
1184
- placement,
1185
- rects,
1186
- platform,
1187
- elements
1183
+ y
1188
1184
  } = middlewareArguments;
1189
- const diffCoords = convertValueToCoords(placement, rects, value, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
1185
+ const diffCoords = await convertValueToCoords(middlewareArguments, value);
1190
1186
  return {
1191
1187
  x: x + diffCoords.x,
1192
1188
  y: y + diffCoords.y,
@@ -1198,7 +1194,7 @@ const offset = function (value) {
1198
1194
  };
1199
1195
 
1200
1196
  function isWindow(value) {
1201
- return (value == null ? void 0 : value.toString()) === '[object Window]';
1197
+ return value && value.document && value.location && value.alert && value.setInterval;
1202
1198
  }
1203
1199
  function getWindow(node) {
1204
1200
  if (node == null) {
@@ -1213,7 +1209,7 @@ function getWindow(node) {
1213
1209
  return node;
1214
1210
  }
1215
1211
 
1216
- function getComputedStyle$1(element) {
1212
+ function getComputedStyle(element) {
1217
1213
  return getWindow(element).getComputedStyle(element);
1218
1214
  }
1219
1215
 
@@ -1221,6 +1217,16 @@ function getNodeName(node) {
1221
1217
  return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
1222
1218
  }
1223
1219
 
1220
+ function getUAString() {
1221
+ const uaData = navigator.userAgentData;
1222
+
1223
+ if (uaData != null && uaData.brands) {
1224
+ return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
1225
+ }
1226
+
1227
+ return navigator.userAgent;
1228
+ }
1229
+
1224
1230
  function isHTMLElement(value) {
1225
1231
  return value instanceof getWindow(value).HTMLElement;
1226
1232
  }
@@ -1231,6 +1237,11 @@ function isNode(value) {
1231
1237
  return value instanceof getWindow(value).Node;
1232
1238
  }
1233
1239
  function isShadowRoot(node) {
1240
+ // Browsers without `ShadowRoot` support
1241
+ if (typeof ShadowRoot === 'undefined') {
1242
+ return false;
1243
+ }
1244
+
1234
1245
  const OwnElement = getWindow(node).ShadowRoot;
1235
1246
  return node instanceof OwnElement || node instanceof ShadowRoot;
1236
1247
  }
@@ -1239,36 +1250,46 @@ function isOverflowElement(element) {
1239
1250
  const {
1240
1251
  overflow,
1241
1252
  overflowX,
1242
- overflowY
1243
- } = getComputedStyle$1(element);
1244
- return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
1253
+ overflowY,
1254
+ display
1255
+ } = getComputedStyle(element);
1256
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
1245
1257
  }
1246
1258
  function isTableElement(element) {
1247
1259
  return ['table', 'td', 'th'].includes(getNodeName(element));
1248
1260
  }
1249
1261
  function isContainingBlock(element) {
1250
1262
  // TODO: Try and use feature detection here instead
1251
- const isFirefox = navigator.userAgent.toLowerCase().includes('firefox');
1252
- const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that
1263
+ const isFirefox = /firefox/i.test(getUAString());
1264
+ const css = getComputedStyle(element); // This is non-exhaustive but covers the most common CSS properties that
1253
1265
  // create a containing block.
1254
1266
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1255
1267
 
1256
- return css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
1268
+ return css.transform !== 'none' || css.perspective !== 'none' || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective'].some(value => css.willChange.includes(value)) || ['paint', 'layout', 'strict', 'content'].some( // TS 4.1 compat
1269
+ value => {
1270
+ const contain = css.contain;
1271
+ return contain != null ? contain.includes(value) : false;
1272
+ });
1257
1273
  }
1258
1274
  function isLayoutViewport() {
1259
1275
  // Not Safari
1260
- return !/^((?!chrome|android).)*safari/i.test(navigator.userAgent); // Feature detection for this fails in various ways
1276
+ return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
1261
1277
  // • Always-visible scrollbar or not
1262
1278
  // • Width of <html>, etc.
1263
1279
  // const vV = win.visualViewport;
1264
1280
  // return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
1265
1281
  }
1282
+ function isLastTraversableNode(node) {
1283
+ return ['html', 'body', '#document'].includes(getNodeName(node));
1284
+ }
1266
1285
 
1267
1286
  const min = Math.min;
1268
1287
  const max = Math.max;
1269
1288
  const round = Math.round;
1270
1289
 
1271
1290
  function getBoundingClientRect(element, includeScale, isFixedStrategy) {
1291
+ var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
1292
+
1272
1293
  if (includeScale === void 0) {
1273
1294
  includeScale = false;
1274
1295
  }
@@ -1288,8 +1309,8 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
1288
1309
 
1289
1310
  const win = isElement(element) ? getWindow(element) : window;
1290
1311
  const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
1291
- const x = (clientRect.left + (addVisualOffsets ? win.visualViewport.offsetLeft : 0)) / scaleX;
1292
- const y = (clientRect.top + (addVisualOffsets ? win.visualViewport.offsetTop : 0)) / scaleY;
1312
+ const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
1313
+ const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
1293
1314
  const width = clientRect.width / scaleX;
1294
1315
  const height = clientRect.height / scaleY;
1295
1316
  return {
@@ -1309,16 +1330,16 @@ function getDocumentElement(node) {
1309
1330
  }
1310
1331
 
1311
1332
  function getNodeScroll(element) {
1312
- if (isWindow(element)) {
1333
+ if (isElement(element)) {
1313
1334
  return {
1314
- scrollLeft: element.pageXOffset,
1315
- scrollTop: element.pageYOffset
1335
+ scrollLeft: element.scrollLeft,
1336
+ scrollTop: element.scrollTop
1316
1337
  };
1317
1338
  }
1318
1339
 
1319
1340
  return {
1320
- scrollLeft: element.scrollLeft,
1321
- scrollTop: element.scrollTop
1341
+ scrollLeft: element.pageXOffset,
1342
+ scrollTop: element.pageYOffset
1322
1343
  };
1323
1344
  }
1324
1345
 
@@ -1336,7 +1357,8 @@ function isScaled(element) {
1336
1357
  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1337
1358
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
1338
1359
  const documentElement = getDocumentElement(offsetParent);
1339
- const rect = getBoundingClientRect(element, isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
1360
+ const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
1361
+ isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
1340
1362
  let scroll = {
1341
1363
  scrollLeft: 0,
1342
1364
  scrollTop: 0
@@ -1398,11 +1420,12 @@ function getContainingBlock(element) {
1398
1420
  currentNode = currentNode.host;
1399
1421
  }
1400
1422
 
1401
- while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {
1423
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1402
1424
  if (isContainingBlock(currentNode)) {
1403
1425
  return currentNode;
1404
1426
  } else {
1405
- currentNode = currentNode.parentNode;
1427
+ const parent = currentNode.parentNode;
1428
+ currentNode = isShadowRoot(parent) ? parent.host : parent;
1406
1429
  }
1407
1430
  }
1408
1431
 
@@ -1526,7 +1549,7 @@ function getDocumentRect(element) {
1526
1549
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1527
1550
  const y = -scroll.scrollTop;
1528
1551
 
1529
- if (getComputedStyle$1(body || html).direction === 'rtl') {
1552
+ if (getComputedStyle(body || html).direction === 'rtl') {
1530
1553
  x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
1531
1554
  }
1532
1555
 
@@ -1541,7 +1564,7 @@ function getDocumentRect(element) {
1541
1564
  function getNearestOverflowAncestor(node) {
1542
1565
  const parentNode = getParentNode(node);
1543
1566
 
1544
- if (['html', 'body', '#document'].includes(getNodeName(parentNode))) {
1567
+ if (isLastTraversableNode(parentNode)) {
1545
1568
  // @ts-ignore assume body is always available
1546
1569
  return node.ownerDocument.body;
1547
1570
  }
@@ -1566,7 +1589,7 @@ function getOverflowAncestors(node, list) {
1566
1589
  const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
1567
1590
  const updatedList = list.concat(target);
1568
1591
  return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
1569
- updatedList.concat(getOverflowAncestors(getParentNode(target)));
1592
+ updatedList.concat(getOverflowAncestors(target));
1570
1593
  }
1571
1594
 
1572
1595
  function contains(parent, child) {
@@ -1592,6 +1615,22 @@ function contains(parent, child) {
1592
1615
  return false;
1593
1616
  }
1594
1617
 
1618
+ function getNearestParentCapableOfEscapingClipping(element, clippingAncestors) {
1619
+ let currentNode = element;
1620
+
1621
+ while (currentNode && !isLastTraversableNode(currentNode) && // @ts-expect-error
1622
+ !clippingAncestors.includes(currentNode)) {
1623
+ if (isElement(currentNode) && ['absolute', 'fixed'].includes(getComputedStyle(currentNode).position)) {
1624
+ break;
1625
+ }
1626
+
1627
+ const parentNode = getParentNode(currentNode);
1628
+ currentNode = isShadowRoot(parentNode) ? parentNode.host : parentNode;
1629
+ }
1630
+
1631
+ return currentNode;
1632
+ }
1633
+
1595
1634
  function getInnerBoundingClientRect(element, strategy) {
1596
1635
  const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
1597
1636
  const top = clientRect.top + element.clientTop;
@@ -1625,15 +1664,25 @@ function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
1625
1664
 
1626
1665
  function getClippingAncestors(element) {
1627
1666
  const clippingAncestors = getOverflowAncestors(element);
1628
- const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);
1629
- const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
1667
+ const nearestEscapableParent = getNearestParentCapableOfEscapingClipping(element, clippingAncestors);
1668
+ let clipperElement = null;
1669
+
1670
+ if (nearestEscapableParent && isHTMLElement(nearestEscapableParent)) {
1671
+ const offsetParent = getOffsetParent(nearestEscapableParent);
1672
+
1673
+ if (isOverflowElement(nearestEscapableParent)) {
1674
+ clipperElement = nearestEscapableParent;
1675
+ } else if (isHTMLElement(offsetParent)) {
1676
+ clipperElement = offsetParent;
1677
+ }
1678
+ }
1630
1679
 
1631
1680
  if (!isElement(clipperElement)) {
1632
1681
  return [];
1633
1682
  } // @ts-ignore isElement check ensures we return Array<Element>
1634
1683
 
1635
1684
 
1636
- return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
1685
+ return clippingAncestors.filter(clippingAncestors => clipperElement && isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
1637
1686
  } // Gets the maximum area that the element is visible in due to any number of
1638
1687
  // clipping ancestors
1639
1688
 
@@ -1686,7 +1735,7 @@ const platform = {
1686
1735
  };
1687
1736
  },
1688
1737
  getClientRects: element => Array.from(element.getClientRects()),
1689
- isRTL: element => getComputedStyle$1(element).direction === 'rtl'
1738
+ isRTL: element => getComputedStyle(element).direction === 'rtl'
1690
1739
  };
1691
1740
 
1692
1741
  /**
@@ -1700,14 +1749,11 @@ function autoUpdate(reference, floating, update, options) {
1700
1749
 
1701
1750
  const {
1702
1751
  ancestorScroll: _ancestorScroll = true,
1703
- ancestorResize: _ancestorResize = true,
1704
- elementResize: _elementResize = true,
1752
+ ancestorResize = true,
1753
+ elementResize = true,
1705
1754
  animationFrame = false
1706
1755
  } = options;
1707
- let cleanedUp = false;
1708
1756
  const ancestorScroll = _ancestorScroll && !animationFrame;
1709
- const ancestorResize = _ancestorResize && !animationFrame;
1710
- const elementResize = _elementResize && !animationFrame;
1711
1757
  const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
1712
1758
  ancestors.forEach(ancestor => {
1713
1759
  ancestorScroll && ancestor.addEventListener('scroll', update, {
@@ -1718,8 +1764,15 @@ function autoUpdate(reference, floating, update, options) {
1718
1764
  let observer = null;
1719
1765
 
1720
1766
  if (elementResize) {
1721
- observer = new ResizeObserver(update);
1722
- isElement(reference) && observer.observe(reference);
1767
+ let initialUpdate = true;
1768
+ observer = new ResizeObserver(() => {
1769
+ if (!initialUpdate) {
1770
+ update();
1771
+ }
1772
+
1773
+ initialUpdate = false;
1774
+ });
1775
+ isElement(reference) && !animationFrame && observer.observe(reference);
1723
1776
  observer.observe(floating);
1724
1777
  }
1725
1778
 
@@ -1731,10 +1784,6 @@ function autoUpdate(reference, floating, update, options) {
1731
1784
  }
1732
1785
 
1733
1786
  function frameLoop() {
1734
- if (cleanedUp) {
1735
- return;
1736
- }
1737
-
1738
1787
  const nextRefRect = getBoundingClientRect(reference);
1739
1788
 
1740
1789
  if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
@@ -1745,10 +1794,10 @@ function autoUpdate(reference, floating, update, options) {
1745
1794
  frameId = requestAnimationFrame(frameLoop);
1746
1795
  }
1747
1796
 
1797
+ update();
1748
1798
  return () => {
1749
1799
  var _observer;
1750
1800
 
1751
- cleanedUp = true;
1752
1801
  ancestors.forEach(ancestor => {
1753
1802
  ancestorScroll && ancestor.removeEventListener('scroll', update);
1754
1803
  ancestorResize && ancestor.removeEventListener('resize', update);
@@ -1786,10 +1835,18 @@ const CatMenu = class {
1786
1835
  * The placement of the menu.
1787
1836
  */
1788
1837
  this.placement = 'bottom-start';
1838
+ /**
1839
+ * Do not close the menu on outside clicks.
1840
+ */
1841
+ this.noAutoClose = false;
1789
1842
  }
1790
1843
  clickHandler(event) {
1844
+ if (!this.trigger) {
1845
+ this.initTrigger();
1846
+ this.show();
1847
+ }
1791
1848
  // hide menu on button click
1792
- if (this.content && event.composedPath().includes(this.content)) {
1849
+ if (!this.noAutoClose && this.content && event.composedPath().includes(this.content)) {
1793
1850
  this.close();
1794
1851
  }
1795
1852
  }
@@ -1802,16 +1859,7 @@ const CatMenu = class {
1802
1859
  this.hide();
1803
1860
  }
1804
1861
  componentDidLoad() {
1805
- var _a, _b, _c, _d, _e;
1806
- this.trigger = this.findTrigger();
1807
- (_a = this.trigger) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-haspopup', 'true');
1808
- (_b = this.trigger) === null || _b === void 0 ? void 0 : _b.setAttribute('aria-expanded', 'false');
1809
- (_c = this.trigger) === null || _c === void 0 ? void 0 : _c.setAttribute('aria-controls', this.contentId);
1810
- (_d = this.content) === null || _d === void 0 ? void 0 : _d.setAttribute('id', this.contentId);
1811
- if (this.trigger && this.content) {
1812
- (_e = this.trigger) === null || _e === void 0 ? void 0 : _e.addEventListener('click', () => this.show());
1813
- autoUpdate(this.trigger, this.content, () => this.update());
1814
- }
1862
+ this.initTrigger();
1815
1863
  this.keyListener = event => {
1816
1864
  if (this.content && ['ArrowDown', 'ArrowUp'].includes(event.key)) {
1817
1865
  const targetElements = firstTabbable.tabbable(this.content, { includeContainer: false, getShadowRoot: true });
@@ -1836,6 +1884,21 @@ const CatMenu = class {
1836
1884
  get contentId() {
1837
1885
  return `cat-menu-${this.id}`;
1838
1886
  }
1887
+ initTrigger() {
1888
+ var _a, _b, _c, _d, _e;
1889
+ this.trigger = this.findTrigger();
1890
+ (_a = this.trigger) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-haspopup', 'true');
1891
+ (_b = this.trigger) === null || _b === void 0 ? void 0 : _b.setAttribute('aria-expanded', 'false');
1892
+ (_c = this.trigger) === null || _c === void 0 ? void 0 : _c.setAttribute('aria-controls', this.contentId);
1893
+ (_d = this.content) === null || _d === void 0 ? void 0 : _d.setAttribute('id', this.contentId);
1894
+ if (this.trigger && this.content) {
1895
+ (_e = this.trigger) === null || _e === void 0 ? void 0 : _e.addEventListener('click', () => {
1896
+ var _a;
1897
+ ((_a = this.trap) === null || _a === void 0 ? void 0 : _a.active) ? this.close() : this.show();
1898
+ });
1899
+ autoUpdate(this.trigger, this.content, () => this.update());
1900
+ }
1901
+ }
1839
1902
  show() {
1840
1903
  var _a;
1841
1904
  if (this.content) {
@@ -1849,8 +1912,10 @@ const CatMenu = class {
1849
1912
  getShadowRoot: true
1850
1913
  },
1851
1914
  allowOutsideClick: true,
1852
- clickOutsideDeactivates: event => !this.content || !event.composedPath().includes(this.content),
1853
- onPostDeactivate: () => this.hide()
1915
+ clickOutsideDeactivates: event => !this.noAutoClose &&
1916
+ (!this.content || !event.composedPath().includes(this.content)) &&
1917
+ (!this.trigger || !event.composedPath().includes(this.trigger)),
1918
+ onPostDeactivate: () => this.close()
1854
1919
  });
1855
1920
  this.trap.activate();
1856
1921
  }
@@ -1894,14 +1959,13 @@ const CatMenu = class {
1894
1959
  if (!trigger) {
1895
1960
  catNotification.loglevel.error('Cannot find tabbable element. Use [data-trigger] to set the trigger.');
1896
1961
  }
1897
- console.log(trigger);
1898
1962
  return trigger;
1899
1963
  }
1900
1964
  };
1901
1965
  CatMenu.OFFSET = 4;
1902
1966
  CatMenu.style = catMenuCss;
1903
1967
 
1904
- 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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}: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;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.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))}.is-disabled input{background-color:#f8f8fb}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}";
1968
+ 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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}: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;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.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))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}";
1905
1969
 
1906
1970
  let nextUniqueId$5 = 0;
1907
1971
  const CatRadio = class {
@@ -3913,7 +3977,7 @@ var autosizeInput = function (element, options) {
3913
3977
  }
3914
3978
  };
3915
3979
 
3916
- const catSelectCss = ".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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative;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;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));transition:box-shadow 0.13s linear;padding:0.25rem}.select-wrapper:not(.select-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-border-color-dark, 215, 219, 224))}.select-wrapper:not(.select-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 0.13s linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:absolute;right:0;background:white;display:none;overflow:auto;box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:var(--cat-border-radius-m, 0.25rem);z-index:100}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem;--cat-avatar-size:1.25rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
3980
+ const catSelectCss = ".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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative;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;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));transition:box-shadow 0.13s linear;padding:0.25rem}.select-wrapper:not(.select-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-border-color-dark, 215, 219, 224))}.select-wrapper:not(.select-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 0.13s linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:absolute;right:0;background:white;display:none;overflow:auto;box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:var(--cat-border-radius-m, 0.25rem);z-index:100}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem;--cat-avatar-size:1.25rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
3917
3981
 
3918
3982
  const INIT_STATE = {
3919
3983
  term: '',
@@ -4146,15 +4210,12 @@ const CatSelect = class {
4146
4210
  .pipe(debounce(term => (term ? timer(this.debounce) : of(0))), distinctUntilChanged(), tap(() => (number$ = this.more$.pipe(filter(() => !this.state.isLoading), scan(n => n + 1, 0), startWith(0)))), tap(() => this.patchState({ options: [] })), switchMap(term => number$.pipe(tap(() => this.patchState({ isLoading: true })), switchMap(number => this.connectorSafe.retrieve(term, number)), tap(page => this.patchState({ isLoading: false, totalElements: page.totalElements })), takeWhile(page => !page.last, true), scan((items, page) => [...items, ...page.content], []))))
4147
4211
  .subscribe(items => {
4148
4212
  var _a;
4149
- const options = items === null || items === void 0 ? void 0 : items.map(item => ({
4150
- item: Object.assign(Object.assign({}, item), { id: this.connectorSafe.customId ? this.connectorSafe.customId(item) : item.id }),
4151
- render: this.connectorSafe.render(item)
4152
- }));
4213
+ const options = this.toSelectItems(items);
4153
4214
  if (this.tags &&
4154
4215
  this.state.term.trim().length &&
4155
4216
  !options.find(value1 => value1.render.label.toLowerCase() === this.state.term.toLowerCase())) {
4156
4217
  let label;
4157
- if (this.isAlreadyCreated(this.state.term)) {
4218
+ if (this.isTagSelected(this.state.term)) {
4158
4219
  label = (_a = this.state.selection.find(item => item.render.label.toLowerCase() === this.state.term.toLowerCase())) === null || _a === void 0 ? void 0 : _a.render.label;
4159
4220
  }
4160
4221
  options.unshift({
@@ -4183,19 +4244,14 @@ const CatSelect = class {
4183
4244
  get optionsList() {
4184
4245
  return this.state.options.map((item, i) => {
4185
4246
  const isTagOption = this.tags && item.item.id === `select-${this.id}-option-tag`;
4186
- const getAriaSelected = () => {
4187
- if (isTagOption) {
4188
- return this.isAlreadyCreated(item.render.label) ? 'true' : 'false';
4189
- }
4190
- return this.isSelected(item.item.id) ? 'true' : 'false';
4191
- };
4247
+ const isOptionSelected = this.isSelected(item.item.id) || (this.tags && this.isTagSelected(item.render.label));
4192
4248
  const getLabel = () => {
4193
4249
  if (isTagOption) {
4194
4250
  return item.render.label + this.tagTextHelp;
4195
4251
  }
4196
4252
  return item.render.label;
4197
4253
  };
4198
- return (index.h("li", { role: "option", class: "select-option", id: `select-${this.id}-option-${i}`, "aria-selected": getAriaSelected() }, this.multiple ? (index.h("cat-checkbox", { class: { 'select-option-active': this.state.activeOptionIndex === i }, checked: !isTagOption ? this.isSelected(item.item.id) : this.isAlreadyCreated(item.render.label), tabIndex: -1, labelLeft: true, onFocus: () => { var _a; return (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus(); }, onCatChange: e => {
4254
+ return (index.h("li", { role: "option", class: "select-option", id: `select-${this.id}-option-${i}`, "aria-selected": isOptionSelected ? 'true' : 'false' }, this.multiple ? (index.h("cat-checkbox", { class: { 'select-option-active': this.state.activeOptionIndex === i }, checked: isOptionSelected, tabIndex: -1, labelLeft: true, onFocus: () => { var _a; return (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus(); }, onCatChange: e => {
4199
4255
  !isTagOption ? this.toggle(item) : this.toggleTag(item);
4200
4256
  e.stopPropagation();
4201
4257
  } }, index.h("span", { slot: "label", class: "select-option-inner" }, item.render.avatar ? (index.h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, initials: '' })) : null, index.h("span", { class: "select-option-text" }, index.h("span", { class: "select-option-label" }, getLabel()), index.h("span", { class: "select-option-description" }, item.render.description))))) : (index.h("div", { class: {
@@ -4224,9 +4280,9 @@ const CatSelect = class {
4224
4280
  }
4225
4281
  const data$ = ids.length ? this.connectorSafe.resolve(ids).pipe(first()) : of([]);
4226
4282
  data$.pipe(catchError(() => of([]))).subscribe(items => {
4227
- const selection = items.length ? items === null || items === void 0 ? void 0 : items.map(item => ({ item, render: this.connectorSafe.render(item) })) : [];
4283
+ const selection = items.length ? this.toSelectItems(items) : [];
4228
4284
  if (this.tags) {
4229
- tags === null || tags === void 0 ? void 0 : tags.forEach((tag, index) => {
4285
+ tags === null || tags === void 0 ? void 0 : tags.filter(tag => !this.isTagSelected(tag, selection)).forEach((tag, index) => {
4230
4286
  const item = { id: `select-${this.id}-tag-${index}`, name: tag };
4231
4287
  selection.push({ item, render: { label: item.name } });
4232
4288
  });
@@ -4238,6 +4294,12 @@ const CatSelect = class {
4238
4294
  });
4239
4295
  });
4240
4296
  }
4297
+ toSelectItems(items) {
4298
+ return items === null || items === void 0 ? void 0 : items.map(item => ({
4299
+ item: Object.assign(Object.assign({}, item), { id: this.connectorSafe.customId ? this.connectorSafe.customId(item) : item.id }),
4300
+ render: this.connectorSafe.render(item)
4301
+ }));
4302
+ }
4241
4303
  show() {
4242
4304
  var _a;
4243
4305
  if (!this.state.isOpen) {
@@ -4288,7 +4350,11 @@ const CatSelect = class {
4288
4350
  }
4289
4351
  }
4290
4352
  toggle(item) {
4291
- this.isSelected(item.item.id) ? this.deselect(item.item.id) : this.select(item);
4353
+ this.isSelected(item.item.id)
4354
+ ? this.deselect(item.item.id)
4355
+ : this.tags && this.isTagSelected(item.render.label)
4356
+ ? this.removeTag(item.render.label)
4357
+ : this.select(item);
4292
4358
  }
4293
4359
  clear() {
4294
4360
  if (this.input && this.state.term) {
@@ -4415,13 +4481,13 @@ const CatSelect = class {
4415
4481
  }
4416
4482
  }
4417
4483
  get tagTextHelp() {
4418
- return this.tagHint && !this.isAlreadyCreated(this.state.term) ? ' (' + this.tagHint + ')' : '';
4484
+ return this.tagHint && !this.isTagSelected(this.state.term) ? ' (' + this.tagHint + ')' : '';
4419
4485
  }
4420
- isAlreadyCreated(term) {
4421
- return this.state.selection.findIndex(item => item.render.label.toLowerCase() === term.toLowerCase()) >= 0;
4486
+ isTagSelected(term, selection = this.state.selection) {
4487
+ return selection.findIndex(item => item.render.label.toLowerCase() === term.toLowerCase()) >= 0;
4422
4488
  }
4423
4489
  createTag(term) {
4424
- if (term.trim().length && !this.isAlreadyCreated(term)) {
4490
+ if (term.trim().length && !this.isTagSelected(term)) {
4425
4491
  const value = this.value;
4426
4492
  const tags = value === null || value === void 0 ? void 0 : value.tags;
4427
4493
  const tag = { id: `select-${this.id}-tag-${tags ? tags.length : 0}`, name: term };
@@ -4429,6 +4495,15 @@ const CatSelect = class {
4429
4495
  }
4430
4496
  this.setTransparentCaret();
4431
4497
  }
4498
+ removeTag(label) {
4499
+ if (this.isTagSelected(label)) {
4500
+ const item = this.state.selection.find(item => item.render.label.toLowerCase() === label.toLowerCase());
4501
+ item && this.deselect(item.item.id);
4502
+ }
4503
+ }
4504
+ toggleTag(item) {
4505
+ this.isTagSelected(item.render.label) ? this.removeTag(item.render.label) : this.createTag(item.render.label);
4506
+ }
4432
4507
  initIds() {
4433
4508
  let ids = [];
4434
4509
  if (this.value) {
@@ -4467,15 +4542,6 @@ const CatSelect = class {
4467
4542
  }
4468
4543
  return tags;
4469
4544
  }
4470
- toggleTag(item) {
4471
- this.isAlreadyCreated(item.render.label) ? this.removeTag(item.render.label) : this.createTag(item.render.label);
4472
- }
4473
- removeTag(label) {
4474
- if (this.isAlreadyCreated(label)) {
4475
- const item = this.state.selection.find(item => item.render.label.toLowerCase() === label.toLowerCase());
4476
- item && this.deselect(item.item.id);
4477
- }
4478
- }
4479
4545
  setTransparentCaret() {
4480
4546
  var _a;
4481
4547
  if (!this.multiple) {
@@ -4563,7 +4629,7 @@ const CatSelectTest = class {
4563
4629
  }
4564
4630
  })
4565
4631
  });
4566
- (_c = this.multipleSelectTagging) === null || _c === void 0 ? void 0 : _c.connect(Object.assign(Object.assign({}, this.countryConnector), { customId: (item) => item.country }));
4632
+ (_c = this.multipleSelectTagging) === null || _c === void 0 ? void 0 : _c.connect(this.countryConnector);
4567
4633
  (_d = this.singleSelect) === null || _d === void 0 ? void 0 : _d.connect({
4568
4634
  resolve: (ids) => {
4569
4635
  console.info(`Resolving data... (${ids.join(', ')})`);
@@ -4598,7 +4664,7 @@ const CatSelectTest = class {
4598
4664
  (_f = this.singleSelectTagging) === null || _f === void 0 ? void 0 : _f.connect(this.countryConnector);
4599
4665
  }
4600
4666
  render() {
4601
- return (index.h(index.Host, { style: { display: 'flex', flexDirection: 'column' } }, index.h("cat-select", { label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => { var _a; return console.log((_a = this.multipleSelect) === null || _a === void 0 ? void 0 : _a.value); }, onCatBlur: e => console.log('Multiple blur', e), multiple: true, clearable: true }, index.h("span", { slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true }), index.h("cat-select", { label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania'] }, placeholder: "Select country", onCatChange: () => { var _a; return console.log((_a = this.multipleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, multiple: true, tags: true, clearable: true }), index.h("cat-select", { label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true }), index.h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', onCatChange: () => { var _a; return console.log((_a = this.singleSelectAvatar) === null || _a === void 0 ? void 0 : _a.value); }, placeholder: "Search for a country or capital", clearable: true }), index.h("cat-select", { label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '1', tag: '' }, placeholder: "Search for a country or capital", onCatChange: () => { var _a; return console.log('Single', (_a = this.singleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, tagHint: "new country", tags: true, clearable: true })));
4667
+ return (index.h(index.Host, { style: { display: 'flex', flexDirection: 'column' } }, index.h("cat-select", { label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => { var _a; return console.log((_a = this.multipleSelect) === null || _a === void 0 ? void 0 : _a.value); }, onCatBlur: e => console.log('Multiple blur', e), multiple: true, clearable: true }, index.h("span", { slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true }), index.h("cat-select", { label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }, placeholder: "Select country", onCatChange: () => { var _a; return console.log((_a = this.multipleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, multiple: true, tags: true, clearable: true }), index.h("cat-select", { label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true }), index.h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', onCatChange: () => { var _a; return console.log((_a = this.singleSelectAvatar) === null || _a === void 0 ? void 0 : _a.value); }, placeholder: "Search for a country or capital", clearable: true }), index.h("cat-select", { label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '', tag: 'Albania' }, placeholder: "Search for a country or capital", onCatChange: () => { var _a; return console.log('Single', (_a = this.singleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, tagHint: "new country", tags: true, clearable: true })));
4602
4668
  }
4603
4669
  get countryConnector() {
4604
4670
  return {
@@ -6034,7 +6100,7 @@ CatTabs.style = catTabsCss;
6034
6100
 
6035
6101
  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;
6036
6102
 
6037
- const catTextareaCss = ".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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);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;font-weight:var(--cat-font-weight-body, 400);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:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));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 rgb(var(--cat-border-color-dark, 215, 219, 224))}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))}";
6103
+ const catTextareaCss = ".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;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:rgb(var(--cat-danger-text, 217, 52, 13))}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);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;font-weight:var(--cat-font-weight-body, 400);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:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:0 0 0 1px rgb(var(--cat-border-color-dark, 215, 219, 224));transition:box-shadow 0.13s linear}textarea:disabled{background:#f2f4f7;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 rgb(var(--cat-border-color-dark, 215, 219, 224))}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))}";
6038
6104
 
6039
6105
  let nextUniqueId$2 = 0;
6040
6106
  const CatTextarea = class {