@haiilo/catalyst 6.3.1 → 6.3.3

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 (83) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/catalyst.esm.js.map +1 -1
  3. package/dist/catalyst/p-2ecedf97.entry.js +10 -0
  4. package/dist/catalyst/p-2ecedf97.entry.js.map +1 -0
  5. package/dist/catalyst/scss/_snippets/_form-label.scss +12 -4
  6. package/dist/catalyst/scss/fonts/_fonts.mixins.lato.scss +36 -18
  7. package/dist/catalyst/scss/utils/_color.scss +3 -1
  8. package/dist/catalyst/scss/utils/_typography.mixins.scss +10 -2
  9. package/dist/catalyst/scss/vendor/_flatpickr.scss +5 -2
  10. package/dist/cjs/cat-alert_26.cjs.entry.js +540 -267
  11. package/dist/cjs/cat-alert_26.cjs.entry.js.map +1 -1
  12. package/dist/cjs/catalyst.cjs.js +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/components/cat-button/cat-button.css +0 -1
  15. package/dist/collection/components/cat-datepicker/cat-datepicker.config.js +6 -0
  16. package/dist/collection/components/cat-datepicker/cat-datepicker.config.js.map +1 -1
  17. package/dist/collection/components/cat-datepicker/cat-datepicker.js +21 -0
  18. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
  19. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +17 -0
  20. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js.map +1 -1
  21. package/dist/collection/components/cat-dropdown/cat-dropdown.js +23 -18
  22. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  23. package/dist/collection/components/cat-input/cat-input.css +24 -8
  24. package/dist/collection/components/cat-input/cat-input.js +2 -2
  25. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  26. package/dist/collection/components/cat-select/cat-select.css +24 -8
  27. package/dist/collection/components/cat-select/cat-select.js +25 -17
  28. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  29. package/dist/collection/components/cat-select/cat-select.spec.js +1 -1
  30. package/dist/collection/components/cat-select/cat-select.spec.js.map +1 -1
  31. package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
  32. package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
  33. package/dist/collection/components/cat-tabs/cat-tabs.css +7 -1
  34. package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
  35. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  36. package/dist/collection/components/cat-textarea/cat-textarea.css +24 -8
  37. package/dist/collection/components/cat-textarea/cat-textarea.js +1 -1
  38. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  39. package/dist/collection/components/cat-tooltip/cat-tooltip.js +1 -1
  40. package/dist/collection/scss/_snippets/_form-label.scss +12 -4
  41. package/dist/collection/scss/fonts/_fonts.mixins.lato.scss +36 -18
  42. package/dist/collection/scss/utils/_color.scss +3 -1
  43. package/dist/collection/scss/utils/_typography.mixins.scss +10 -2
  44. package/dist/collection/scss/vendor/_flatpickr.scss +5 -2
  45. package/dist/collection/utils/find-closest.js +13 -0
  46. package/dist/collection/utils/find-closest.js.map +1 -0
  47. package/dist/components/cat-button2.js +1 -1
  48. package/dist/components/cat-button2.js.map +1 -1
  49. package/dist/components/cat-checkbox2.js.map +1 -1
  50. package/dist/components/cat-datepicker-inline.js +4 -1
  51. package/dist/components/cat-datepicker-inline.js.map +1 -1
  52. package/dist/components/cat-datepicker.js +19 -0
  53. package/dist/components/cat-datepicker.js.map +1 -1
  54. package/dist/components/cat-datepicker.locale.js +6 -0
  55. package/dist/components/cat-datepicker.locale.js.map +1 -1
  56. package/dist/components/cat-dropdown2.js +265 -112
  57. package/dist/components/cat-dropdown2.js.map +1 -1
  58. package/dist/components/cat-input2.js +3 -3
  59. package/dist/components/cat-input2.js.map +1 -1
  60. package/dist/components/cat-select-demo.js +1 -1
  61. package/dist/components/cat-select-demo.js.map +1 -1
  62. package/dist/components/cat-select2.js +25 -17
  63. package/dist/components/cat-select2.js.map +1 -1
  64. package/dist/components/cat-tabs.js +2 -2
  65. package/dist/components/cat-tabs.js.map +1 -1
  66. package/dist/components/cat-textarea.js +2 -2
  67. package/dist/components/cat-textarea.js.map +1 -1
  68. package/dist/components/cat-tooltip.js.map +1 -1
  69. package/dist/components/floating-ui.dom.esm.js +215 -129
  70. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  71. package/dist/esm/cat-alert_26.entry.js +540 -267
  72. package/dist/esm/cat-alert_26.entry.js.map +1 -1
  73. package/dist/esm/catalyst.js +1 -1
  74. package/dist/esm/loader.js +1 -1
  75. package/dist/types/components/cat-datepicker/cat-datepicker.config.d.ts +3 -0
  76. package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +6 -0
  77. package/dist/types/components/cat-datepicker-inline/cat-datepicker-inline.d.ts +6 -0
  78. package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +1 -0
  79. package/dist/types/components.d.ts +16 -0
  80. package/dist/types/utils/find-closest.d.ts +5 -0
  81. package/package.json +11 -11
  82. package/dist/catalyst/p-dfc7c716.entry.js +0 -10
  83. package/dist/catalyst/p-dfc7c716.entry.js.map +0 -1
@@ -1039,7 +1039,7 @@ function createEmptyStyleRule(query) {
1039
1039
  }
1040
1040
  }
1041
1041
 
1042
- 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 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.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-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.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:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.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, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.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, 81, 92, 108)}.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.1)}.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.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -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.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}: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;gap: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(.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;gap: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(.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;gap: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(.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;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}: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(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-primary-text:transparent;--cat-secondary-bg:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/\"\";height:0;visibility:hidden;overflow:hidden;-webkit-user-select:none;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}";
1042
+ 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 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.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-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.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:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.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, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.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, 81, 92, 108)}.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.1)}.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.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -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.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}: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;gap: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(.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;gap: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(.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;gap: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(.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;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}: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(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-primary-text:transparent;--cat-secondary-bg:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/\"\";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}";
1043
1043
 
1044
1044
  const CatButton = class {
1045
1045
  constructor(hostRef) {
@@ -3884,6 +3884,19 @@ if (typeof window !== "undefined") {
3884
3884
  window.flatpickr = flatpickr;
3885
3885
  }
3886
3886
 
3887
+ /**
3888
+ * Find the closest parent element matching the given selector while traversing
3889
+ * up the DOM tree (including Shadow DOM).
3890
+ */
3891
+ function findClosest(selector, element) {
3892
+ if (element instanceof Element && element.matches(selector)) {
3893
+ return element;
3894
+ }
3895
+ // Search in parent element or Shadow DOM host
3896
+ const nextElement = element instanceof ShadowRoot ? element.host : element.parentElement || element.getRootNode().host;
3897
+ return nextElement ? findClosest(selector, nextElement) : null;
3898
+ }
3899
+
3887
3900
  var weekSelect = of.createCommonjsModule(function (module, exports) {
3888
3901
  (function (global, factory) {
3889
3902
  module.exports = factory() ;
@@ -4004,6 +4017,12 @@ function getConfig(options, more = {}) {
4004
4017
  weekNumbers: true,
4005
4018
  minuteIncrement: options.step,
4006
4019
  clickOpens: !options.disabled && !options.readonly,
4020
+ onReady: (_dates, _dateStr, flatpickr) => {
4021
+ for (const key in options.nativePickerAttributes) {
4022
+ const value = options.nativePickerAttributes[key];
4023
+ flatpickr.calendarContainer.setAttribute(key, value);
4024
+ }
4025
+ },
4007
4026
  onChange: (dates, dateStr, flatpickr) => {
4008
4027
  let value = dateStr || undefined;
4009
4028
  if (options.mode === 'week') {
@@ -4130,6 +4149,7 @@ const CatDatepickerFlat = class {
4130
4149
  this.errors = undefined;
4131
4150
  this.errorUpdate = 0;
4132
4151
  this.nativeAttributes = undefined;
4152
+ this.nativePickerAttributes = undefined;
4133
4153
  }
4134
4154
  get input() {
4135
4155
  return this._input?.shadowRoot?.querySelector('input') ?? undefined;
@@ -4188,6 +4208,9 @@ const CatDatepickerFlat = class {
4188
4208
  if (this.disabled || this.readonly || !input) {
4189
4209
  return;
4190
4210
  }
4211
+ // avoid dropdown closing if datepicker is part of a dropdown
4212
+ const withinDropdown = !!findClosest('cat-dropdown', input);
4213
+ const nativePickerAttributes = withinDropdown ? { 'data-dropdown-no-close': '' } : {};
4191
4214
  return flatpickr(input, getConfig({
4192
4215
  locale: getLocale(of.catI18nRegistry.getLocale()),
4193
4216
  format: getFormat(of.catI18nRegistry.getLocale(), this.mode),
@@ -4197,6 +4220,7 @@ const CatDatepickerFlat = class {
4197
4220
  step: this.step,
4198
4221
  disabled: this.disabled,
4199
4222
  readonly: this.readonly,
4223
+ nativePickerAttributes: { ...nativePickerAttributes, ...this.nativePickerAttributes },
4200
4224
  applyChange: value => (this.value = value)
4201
4225
  }));
4202
4226
  }
@@ -4221,6 +4245,7 @@ const CatDatepickerInline = class {
4221
4245
  this.readonly = false;
4222
4246
  this.step = 5;
4223
4247
  this.value = undefined;
4248
+ this.nativePickerAttributes = undefined;
4224
4249
  }
4225
4250
  onValueChanged(value) {
4226
4251
  if (value) {
@@ -4263,6 +4288,7 @@ const CatDatepickerInline = class {
4263
4288
  step: this.step,
4264
4289
  disabled: this.disabled,
4265
4290
  readonly: this.readonly,
4291
+ nativePickerAttributes: this.nativePickerAttributes ?? {},
4266
4292
  applyChange: value => (this.value = value)
4267
4293
  }, {
4268
4294
  ...(this.disabled ? { enable: [] } : {}),
@@ -4955,7 +4981,7 @@ const size = function (options) {
4955
4981
 
4956
4982
  function getWindow(node) {
4957
4983
  var _node$ownerDocument;
4958
- return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
4984
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
4959
4985
  }
4960
4986
 
4961
4987
  function getComputedStyle$1(element) {
@@ -4966,22 +4992,24 @@ function isNode(value) {
4966
4992
  return value instanceof getWindow(value).Node;
4967
4993
  }
4968
4994
  function getNodeName(node) {
4969
- return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
4995
+ if (isNode(node)) {
4996
+ return (node.nodeName || '').toLowerCase();
4997
+ }
4998
+ // Mocked nodes in testing environments may not be instances of Node. By
4999
+ // returning `#document` an infinite loop won't occur.
5000
+ // https://github.com/floating-ui/floating-ui/issues/2317
5001
+ return '#document';
4970
5002
  }
4971
5003
 
4972
5004
  function isHTMLElement(value) {
4973
- return value instanceof getWindow(value).HTMLElement;
4974
- }
4975
- function isElement(value) {
4976
- return value instanceof getWindow(value).Element;
5005
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
4977
5006
  }
4978
5007
  function isShadowRoot(node) {
4979
5008
  // Browsers without `ShadowRoot` support.
4980
5009
  if (typeof ShadowRoot === 'undefined') {
4981
5010
  return false;
4982
5011
  }
4983
- const OwnElement = getWindow(node).ShadowRoot;
4984
- return node instanceof OwnElement || node instanceof ShadowRoot;
5012
+ return node instanceof getWindow(node).ShadowRoot || node instanceof ShadowRoot;
4985
5013
  }
4986
5014
  function isOverflowElement(element) {
4987
5015
  const {
@@ -5000,7 +5028,7 @@ function isContainingBlock(element) {
5000
5028
  const css = getComputedStyle$1(element);
5001
5029
 
5002
5030
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
5003
- return css.transform !== 'none' || css.perspective !== 'none' || !safari && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !safari && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
5031
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !safari && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !safari && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
5004
5032
  }
5005
5033
  function isSafari() {
5006
5034
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
@@ -5013,6 +5041,11 @@ function isLastTraversableNode(node) {
5013
5041
  const min = Math.min;
5014
5042
  const max = Math.max;
5015
5043
  const round = Math.round;
5044
+ const floor = Math.floor;
5045
+ const createCoords = v => ({
5046
+ x: v,
5047
+ y: v
5048
+ });
5016
5049
 
5017
5050
  function getCssDimensions(element) {
5018
5051
  const css = getComputedStyle$1(element);
@@ -5031,31 +5064,31 @@ function getCssDimensions(element) {
5031
5064
  return {
5032
5065
  width,
5033
5066
  height,
5034
- fallback: shouldFallback
5067
+ $: shouldFallback
5035
5068
  };
5036
5069
  }
5037
5070
 
5071
+ function isElement(value) {
5072
+ return value instanceof Element || value instanceof getWindow(value).Element;
5073
+ }
5074
+
5038
5075
  function unwrapElement(element) {
5039
5076
  return !isElement(element) ? element.contextElement : element;
5040
5077
  }
5041
5078
 
5042
- const FALLBACK_SCALE = {
5043
- x: 1,
5044
- y: 1
5045
- };
5046
5079
  function getScale(element) {
5047
5080
  const domElement = unwrapElement(element);
5048
5081
  if (!isHTMLElement(domElement)) {
5049
- return FALLBACK_SCALE;
5082
+ return createCoords(1);
5050
5083
  }
5051
5084
  const rect = domElement.getBoundingClientRect();
5052
5085
  const {
5053
5086
  width,
5054
5087
  height,
5055
- fallback
5088
+ $
5056
5089
  } = getCssDimensions(domElement);
5057
- let x = (fallback ? round(rect.width) : rect.width) / width;
5058
- let y = (fallback ? round(rect.height) : rect.height) / height;
5090
+ let x = ($ ? round(rect.width) : rect.width) / width;
5091
+ let y = ($ ? round(rect.height) : rect.height) / height;
5059
5092
 
5060
5093
  // 0, NaN, or Infinity should always fallback to 1.
5061
5094
 
@@ -5071,27 +5104,26 @@ function getScale(element) {
5071
5104
  };
5072
5105
  }
5073
5106
 
5074
- const noOffsets = {
5075
- x: 0,
5076
- y: 0
5077
- };
5078
- function getVisualOffsets(element, isFixed, floatingOffsetParent) {
5079
- var _win$visualViewport, _win$visualViewport2;
5080
- if (isFixed === void 0) {
5081
- isFixed = true;
5082
- }
5083
- if (!isSafari()) {
5084
- return noOffsets;
5085
- }
5086
- const win = element ? getWindow(element) : window;
5087
- if (!floatingOffsetParent || isFixed && floatingOffsetParent !== win) {
5107
+ const noOffsets = /*#__PURE__*/createCoords(0);
5108
+ function getVisualOffsets(element) {
5109
+ const win = getWindow(element);
5110
+ if (!isSafari() || !win.visualViewport) {
5088
5111
  return noOffsets;
5089
5112
  }
5090
5113
  return {
5091
- x: ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0,
5092
- y: ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0
5114
+ x: win.visualViewport.offsetLeft,
5115
+ y: win.visualViewport.offsetTop
5093
5116
  };
5094
5117
  }
5118
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
5119
+ if (isFixed === void 0) {
5120
+ isFixed = false;
5121
+ }
5122
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
5123
+ return false;
5124
+ }
5125
+ return isFixed;
5126
+ }
5095
5127
 
5096
5128
  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
5097
5129
  if (includeScale === void 0) {
@@ -5102,7 +5134,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
5102
5134
  }
5103
5135
  const clientRect = element.getBoundingClientRect();
5104
5136
  const domElement = unwrapElement(element);
5105
- let scale = FALLBACK_SCALE;
5137
+ let scale = createCoords(1);
5106
5138
  if (includeScale) {
5107
5139
  if (offsetParent) {
5108
5140
  if (isElement(offsetParent)) {
@@ -5112,7 +5144,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
5112
5144
  scale = getScale(element);
5113
5145
  }
5114
5146
  }
5115
- const visualOffsets = getVisualOffsets(domElement, isFixedStrategy, offsetParent);
5147
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
5116
5148
  let x = (clientRect.left + visualOffsets.x) / scale.x;
5117
5149
  let y = (clientRect.top + visualOffsets.y) / scale.y;
5118
5150
  let width = clientRect.width / scale.x;
@@ -5125,14 +5157,14 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
5125
5157
  const iframeScale = getScale(currentIFrame);
5126
5158
  const iframeRect = currentIFrame.getBoundingClientRect();
5127
5159
  const css = getComputedStyle(currentIFrame);
5128
- iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
5129
- iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
5160
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
5161
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
5130
5162
  x *= iframeScale.x;
5131
5163
  y *= iframeScale.y;
5132
5164
  width *= iframeScale.x;
5133
5165
  height *= iframeScale.y;
5134
- x += iframeRect.x;
5135
- y += iframeRect.y;
5166
+ x += left;
5167
+ y += top;
5136
5168
  currentIFrame = getWindow(currentIFrame).frameElement;
5137
5169
  }
5138
5170
  }
@@ -5144,10 +5176,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
5144
5176
  });
5145
5177
  }
5146
5178
 
5147
- function getDocumentElement(node) {
5148
- return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
5149
- }
5150
-
5151
5179
  function getNodeScroll(element) {
5152
5180
  if (isElement(element)) {
5153
5181
  return {
@@ -5161,6 +5189,11 @@ function getNodeScroll(element) {
5161
5189
  };
5162
5190
  }
5163
5191
 
5192
+ function getDocumentElement(node) {
5193
+ var _ref;
5194
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
5195
+ }
5196
+
5164
5197
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5165
5198
  let {
5166
5199
  rect,
@@ -5176,14 +5209,8 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5176
5209
  scrollLeft: 0,
5177
5210
  scrollTop: 0
5178
5211
  };
5179
- let scale = {
5180
- x: 1,
5181
- y: 1
5182
- };
5183
- const offsets = {
5184
- x: 0,
5185
- y: 0
5186
- };
5212
+ let scale = createCoords(1);
5213
+ const offsets = createCoords(0);
5187
5214
  if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
5188
5215
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
5189
5216
  scroll = getNodeScroll(offsetParent);
@@ -5203,6 +5230,10 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5203
5230
  };
5204
5231
  }
5205
5232
 
5233
+ function getClientRects(element) {
5234
+ return Array.from(element.getClientRects());
5235
+ }
5236
+
5206
5237
  function getWindowScrollBarX(element) {
5207
5238
  // If <html> has a CSS width greater than the viewport, then this will be
5208
5239
  // incorrect for RTL.
@@ -5249,9 +5280,7 @@ function getParentNode(node) {
5249
5280
  function getNearestOverflowAncestor(node) {
5250
5281
  const parentNode = getParentNode(node);
5251
5282
  if (isLastTraversableNode(parentNode)) {
5252
- // `getParentNode` will never return a `Document` due to the fallback
5253
- // check, so it's either the <html> or <body> element.
5254
- return parentNode.ownerDocument.body;
5283
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
5255
5284
  }
5256
5285
  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
5257
5286
  return parentNode;
@@ -5303,10 +5332,7 @@ function getInnerBoundingClientRect(element, strategy) {
5303
5332
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
5304
5333
  const top = clientRect.top + element.clientTop;
5305
5334
  const left = clientRect.left + element.clientLeft;
5306
- const scale = isHTMLElement(element) ? getScale(element) : {
5307
- x: 1,
5308
- y: 1
5309
- };
5335
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
5310
5336
  const width = element.clientWidth * scale.x;
5311
5337
  const height = element.clientHeight * scale.y;
5312
5338
  const x = left * scale.x;
@@ -5410,6 +5436,36 @@ function getDimensions(element) {
5410
5436
  return getCssDimensions(element);
5411
5437
  }
5412
5438
 
5439
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
5440
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
5441
+ const documentElement = getDocumentElement(offsetParent);
5442
+ const isFixed = strategy === 'fixed';
5443
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
5444
+ let scroll = {
5445
+ scrollLeft: 0,
5446
+ scrollTop: 0
5447
+ };
5448
+ const offsets = createCoords(0);
5449
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
5450
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
5451
+ scroll = getNodeScroll(offsetParent);
5452
+ }
5453
+ if (isHTMLElement(offsetParent)) {
5454
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
5455
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
5456
+ offsets.y = offsetRect.y + offsetParent.clientTop;
5457
+ } else if (documentElement) {
5458
+ offsets.x = getWindowScrollBarX(documentElement);
5459
+ }
5460
+ }
5461
+ return {
5462
+ x: rect.left + scroll.scrollLeft - offsets.x,
5463
+ y: rect.top + scroll.scrollTop - offsets.y,
5464
+ width: rect.width,
5465
+ height: rect.height
5466
+ };
5467
+ }
5468
+
5413
5469
  function getTrueOffsetParent(element, polyfill) {
5414
5470
  if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
5415
5471
  return null;
@@ -5448,68 +5504,115 @@ function getOffsetParent(element, polyfill) {
5448
5504
  return offsetParent || getContainingBlock(element) || window;
5449
5505
  }
5450
5506
 
5451
- function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
5452
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
5453
- const documentElement = getDocumentElement(offsetParent);
5454
- const isFixed = strategy === 'fixed';
5455
- const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
5456
- let scroll = {
5457
- scrollLeft: 0,
5458
- scrollTop: 0
5459
- };
5460
- const offsets = {
5461
- x: 0,
5462
- y: 0
5463
- };
5464
- if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
5465
- if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
5466
- scroll = getNodeScroll(offsetParent);
5467
- }
5468
- if (isHTMLElement(offsetParent)) {
5469
- const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
5470
- offsets.x = offsetRect.x + offsetParent.clientLeft;
5471
- offsets.y = offsetRect.y + offsetParent.clientTop;
5472
- } else if (documentElement) {
5473
- offsets.x = getWindowScrollBarX(documentElement);
5474
- }
5475
- }
5507
+ const getElementRects = async function (_ref) {
5508
+ let {
5509
+ reference,
5510
+ floating,
5511
+ strategy
5512
+ } = _ref;
5513
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
5514
+ const getDimensionsFn = this.getDimensions;
5476
5515
  return {
5477
- x: rect.left + scroll.scrollLeft - offsets.x,
5478
- y: rect.top + scroll.scrollTop - offsets.y,
5479
- width: rect.width,
5480
- height: rect.height
5516
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
5517
+ floating: {
5518
+ x: 0,
5519
+ y: 0,
5520
+ ...(await getDimensionsFn(floating))
5521
+ }
5481
5522
  };
5523
+ };
5524
+
5525
+ function isRTL(element) {
5526
+ return getComputedStyle(element).direction === 'rtl';
5482
5527
  }
5483
5528
 
5484
5529
  const platform = {
5485
- getClippingRect,
5486
5530
  convertOffsetParentRelativeRectToViewportRelativeRect,
5487
- isElement,
5488
- getDimensions,
5489
- getOffsetParent,
5490
5531
  getDocumentElement,
5532
+ getClippingRect,
5533
+ getOffsetParent,
5534
+ getElementRects,
5535
+ getClientRects,
5536
+ getDimensions,
5491
5537
  getScale,
5492
- async getElementRects(_ref) {
5493
- let {
5494
- reference,
5495
- floating,
5496
- strategy
5497
- } = _ref;
5498
- const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
5499
- const getDimensionsFn = this.getDimensions;
5500
- return {
5501
- reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
5502
- floating: {
5503
- x: 0,
5504
- y: 0,
5505
- ...(await getDimensionsFn(floating))
5506
- }
5507
- };
5508
- },
5509
- getClientRects: element => Array.from(element.getClientRects()),
5510
- isRTL: element => getComputedStyle$1(element).direction === 'rtl'
5538
+ isElement,
5539
+ isRTL
5511
5540
  };
5512
5541
 
5542
+ // https://samthor.au/2021/observing-dom/
5543
+ function observeMove(element, onMove) {
5544
+ let io = null;
5545
+ let timeoutId;
5546
+ const root = getDocumentElement(element);
5547
+ function cleanup() {
5548
+ clearTimeout(timeoutId);
5549
+ io && io.disconnect();
5550
+ io = null;
5551
+ }
5552
+ function refresh(skip, threshold) {
5553
+ if (skip === void 0) {
5554
+ skip = false;
5555
+ }
5556
+ if (threshold === void 0) {
5557
+ threshold = 1;
5558
+ }
5559
+ cleanup();
5560
+ const {
5561
+ left,
5562
+ top,
5563
+ width,
5564
+ height
5565
+ } = element.getBoundingClientRect();
5566
+ if (!skip) {
5567
+ onMove();
5568
+ }
5569
+ if (!width || !height) {
5570
+ return;
5571
+ }
5572
+ const insetTop = floor(top);
5573
+ const insetRight = floor(root.clientWidth - (left + width));
5574
+ const insetBottom = floor(root.clientHeight - (top + height));
5575
+ const insetLeft = floor(left);
5576
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
5577
+ const options = {
5578
+ rootMargin,
5579
+ threshold: max(0, min(1, threshold)) || 1
5580
+ };
5581
+ let isFirstUpdate = true;
5582
+ function handleObserve(entries) {
5583
+ const ratio = entries[0].intersectionRatio;
5584
+ if (ratio !== threshold) {
5585
+ if (!isFirstUpdate) {
5586
+ return refresh();
5587
+ }
5588
+ if (!ratio) {
5589
+ timeoutId = setTimeout(() => {
5590
+ refresh(false, 1e-7);
5591
+ }, 100);
5592
+ } else {
5593
+ refresh(false, ratio);
5594
+ }
5595
+ }
5596
+ isFirstUpdate = false;
5597
+ }
5598
+
5599
+ // Older browsers don't support a `document` as the root and will throw an
5600
+ // error.
5601
+ try {
5602
+ io = new IntersectionObserver(handleObserve, {
5603
+ ...options,
5604
+ // Handle <iframe>s
5605
+ root: root.ownerDocument
5606
+ });
5607
+ } catch (e) {
5608
+ io = new IntersectionObserver(handleObserve, options);
5609
+ }
5610
+ io.observe(element);
5611
+ }
5612
+ refresh(true);
5613
+ return cleanup;
5614
+ }
5615
+
5513
5616
  /**
5514
5617
  * Automatically updates the position of the floating element when necessary.
5515
5618
  * Should only be called when the floating element is mounted on the DOM or
@@ -5525,30 +5628,39 @@ function autoUpdate(reference, floating, update, options) {
5525
5628
  const {
5526
5629
  ancestorScroll = true,
5527
5630
  ancestorResize = true,
5528
- elementResize = true,
5631
+ elementResize = typeof ResizeObserver === 'function',
5632
+ layoutShift = typeof IntersectionObserver === 'function',
5529
5633
  animationFrame = false
5530
5634
  } = options;
5531
- const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : []), ...getOverflowAncestors(floating)] : [];
5635
+ const referenceEl = unwrapElement(reference);
5636
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
5532
5637
  ancestors.forEach(ancestor => {
5533
- // ignores Window, checks for [object VisualViewport]
5534
- const isVisualViewport = !isElement(ancestor) && ancestor.toString().includes('V');
5535
- if (ancestorScroll && (animationFrame ? isVisualViewport : true)) {
5536
- ancestor.addEventListener('scroll', update, {
5537
- passive: true
5538
- });
5539
- }
5638
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
5639
+ passive: true
5640
+ });
5540
5641
  ancestorResize && ancestor.addEventListener('resize', update);
5541
5642
  });
5542
- let observer = null;
5643
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
5644
+ let reobserveFrame = -1;
5645
+ let resizeObserver = null;
5543
5646
  if (elementResize) {
5544
- observer = new ResizeObserver(() => {
5647
+ resizeObserver = new ResizeObserver(_ref => {
5648
+ let [firstEntry] = _ref;
5649
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
5650
+ // Prevent update loops when using the `size` middleware.
5651
+ // https://github.com/floating-ui/floating-ui/issues/1740
5652
+ resizeObserver.unobserve(floating);
5653
+ cancelAnimationFrame(reobserveFrame);
5654
+ reobserveFrame = requestAnimationFrame(() => {
5655
+ resizeObserver && resizeObserver.observe(floating);
5656
+ });
5657
+ }
5545
5658
  update();
5546
5659
  });
5547
- isElement(reference) && !animationFrame && observer.observe(reference);
5548
- if (!isElement(reference) && reference.contextElement && !animationFrame) {
5549
- observer.observe(reference.contextElement);
5660
+ if (referenceEl && !animationFrame) {
5661
+ resizeObserver.observe(referenceEl);
5550
5662
  }
5551
- observer.observe(floating);
5663
+ resizeObserver.observe(floating);
5552
5664
  }
5553
5665
  let frameId;
5554
5666
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -5565,13 +5677,13 @@ function autoUpdate(reference, floating, update, options) {
5565
5677
  }
5566
5678
  update();
5567
5679
  return () => {
5568
- var _observer;
5569
5680
  ancestors.forEach(ancestor => {
5570
5681
  ancestorScroll && ancestor.removeEventListener('scroll', update);
5571
5682
  ancestorResize && ancestor.removeEventListener('resize', update);
5572
5683
  });
5573
- (_observer = observer) == null ? void 0 : _observer.disconnect();
5574
- observer = null;
5684
+ cleanupIo && cleanupIo();
5685
+ resizeObserver && resizeObserver.disconnect();
5686
+ resizeObserver = null;
5575
5687
  if (animationFrame) {
5576
5688
  cancelAnimationFrame(frameId);
5577
5689
  }
@@ -6177,7 +6289,7 @@ var isFocusable = function isFocusable(node, options) {
6177
6289
  };
6178
6290
 
6179
6291
  /*!
6180
- * focus-trap 7.4.3
6292
+ * focus-trap 7.5.2
6181
6293
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
6182
6294
  */
6183
6295
 
@@ -6262,10 +6374,10 @@ var isSelectableInput = function isSelectableInput(node) {
6262
6374
  return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
6263
6375
  };
6264
6376
  var isEscapeEvent = function isEscapeEvent(e) {
6265
- return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
6377
+ return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;
6266
6378
  };
6267
6379
  var isTabEvent = function isTabEvent(e) {
6268
- return e.key === 'Tab' || e.keyCode === 9;
6380
+ return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;
6269
6381
  };
6270
6382
 
6271
6383
  // checks for TAB by default
@@ -6349,8 +6461,11 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6349
6461
  // container: HTMLElement,
6350
6462
  // tabbableNodes: Array<HTMLElement>, // empty if none
6351
6463
  // focusableNodes: Array<HTMLElement>, // empty if none
6352
- // firstTabbableNode: HTMLElement|null,
6353
- // lastTabbableNode: HTMLElement|null,
6464
+ // posTabIndexesFound: boolean,
6465
+ // firstTabbableNode: HTMLElement|undefined,
6466
+ // lastTabbableNode: HTMLElement|undefined,
6467
+ // firstDomTabbableNode: HTMLElement|undefined,
6468
+ // lastDomTabbableNode: HTMLElement|undefined,
6354
6469
  // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
6355
6470
  // }>}
6356
6471
  containerGroups: [],
@@ -6367,7 +6482,9 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6367
6482
  paused: false,
6368
6483
  // timer ID for when delayInitialFocus is true and initial focus in this trap
6369
6484
  // has been delayed during activation
6370
- delayInitialFocusTimer: undefined
6485
+ delayInitialFocusTimer: undefined,
6486
+ // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
6487
+ recentNavEvent: undefined
6371
6488
  };
6372
6489
  var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
6373
6490
 
@@ -6386,7 +6503,9 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6386
6503
  /**
6387
6504
  * Finds the index of the container that contains the element.
6388
6505
  * @param {HTMLElement} element
6389
- * @param {Event} [event]
6506
+ * @param {Event} [event] If available, and `element` isn't directly found in any container,
6507
+ * the event's composed path is used to see if includes any known trap containers in the
6508
+ * case where the element is inside a Shadow DOM.
6390
6509
  * @returns {number} Index of the container in either `state.containers` or
6391
6510
  * `state.containerGroups` (the order/length of these lists are the same); -1
6392
6511
  * if the element isn't found.
@@ -6481,14 +6600,41 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6481
6600
  var tabbableNodes = tabbable(container, config.tabbableOptions);
6482
6601
 
6483
6602
  // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
6484
- // are a superset of tabbable nodes
6603
+ // are a superset of tabbable nodes since nodes with negative `tabindex` attributes
6604
+ // are focusable but not tabbable
6485
6605
  var focusableNodes = focusable(container, config.tabbableOptions);
6606
+ var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;
6607
+ var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;
6608
+ var firstDomTabbableNode = focusableNodes.find(function (node) {
6609
+ return isTabbable(node);
6610
+ });
6611
+ var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {
6612
+ return isTabbable(node);
6613
+ });
6614
+ var posTabIndexesFound = !!tabbableNodes.find(function (node) {
6615
+ return getTabIndex(node) > 0;
6616
+ });
6486
6617
  return {
6487
6618
  container: container,
6488
6619
  tabbableNodes: tabbableNodes,
6489
6620
  focusableNodes: focusableNodes,
6490
- firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
6491
- lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
6621
+ /** True if at least one node with positive `tabindex` was found in this container. */
6622
+ posTabIndexesFound: posTabIndexesFound,
6623
+ /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
6624
+ firstTabbableNode: firstTabbableNode,
6625
+ /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
6626
+ lastTabbableNode: lastTabbableNode,
6627
+ // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
6628
+ // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
6629
+ // because that API doesn't work with Shadow DOM as well as it should (@see
6630
+ // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
6631
+ // to address an edge case related to positive tabindex support, this seems like a much easier,
6632
+ // "close enough most of the time" alternative for positive tabindexes which should generally
6633
+ // be avoided anyway...
6634
+ /** First tabbable node in container, __DOM__ order; `undefined` if none. */
6635
+ firstDomTabbableNode: firstDomTabbableNode,
6636
+ /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
6637
+ lastDomTabbableNode: lastDomTabbableNode,
6492
6638
  /**
6493
6639
  * Finds the __tabbable__ node that follows the given node in the specified direction,
6494
6640
  * in this container, if any.
@@ -6499,30 +6645,24 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6499
6645
  */
6500
6646
  nextTabbableNode: function nextTabbableNode(node) {
6501
6647
  var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
6502
- // NOTE: If tabindex is positive (in order to manipulate the tab order separate
6503
- // from the DOM order), this __will not work__ because the list of focusableNodes,
6504
- // while it contains tabbable nodes, does not sort its nodes in any order other
6505
- // than DOM order, because it can't: Where would you place focusable (but not
6506
- // tabbable) nodes in that order? They have no order, because they aren't tabbale...
6507
- // Support for positive tabindex is already broken and hard to manage (possibly
6508
- // not supportable, TBD), so this isn't going to make things worse than they
6509
- // already are, and at least makes things better for the majority of cases where
6510
- // tabindex is either 0/unset or negative.
6511
- // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
6512
- var nodeIdx = focusableNodes.findIndex(function (n) {
6513
- return n === node;
6514
- });
6648
+ var nodeIdx = tabbableNodes.indexOf(node);
6515
6649
  if (nodeIdx < 0) {
6516
- return undefined;
6517
- }
6518
- if (forward) {
6519
- return focusableNodes.slice(nodeIdx + 1).find(function (n) {
6520
- return isTabbable(n, config.tabbableOptions);
6650
+ // either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):
6651
+ // since `node` should at least have been focusable, we assume that's the case and mimic
6652
+ // what browsers do, which is set focus to the next node in __document position order__,
6653
+ // regardless of positive tabindexes, if any -- and for reasons explained in the NOTE
6654
+ // above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to
6655
+ // basic DOM order
6656
+ if (forward) {
6657
+ return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {
6658
+ return isTabbable(el);
6659
+ });
6660
+ }
6661
+ return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {
6662
+ return isTabbable(el);
6521
6663
  });
6522
6664
  }
6523
- return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
6524
- return isTabbable(n, config.tabbableOptions);
6525
- });
6665
+ return tabbableNodes[nodeIdx + (forward ? 1 : -1)];
6526
6666
  }
6527
6667
  };
6528
6668
  });
@@ -6535,6 +6675,19 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6535
6675
  ) {
6536
6676
  throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
6537
6677
  }
6678
+
6679
+ // NOTE: Positive tabindexes are only properly supported in single-container traps because
6680
+ // doing it across multiple containers where tabindexes could be all over the place
6681
+ // would require Tabbable to support multiple containers, would require additional
6682
+ // specialized Shadow DOM support, and would require Tabbable's multi-container support
6683
+ // to look at those containers in document position order rather than user-provided
6684
+ // order (as they are treated in Focus-trap, for legacy reasons). See discussion on
6685
+ // https://github.com/focus-trap/focus-trap/issues/375 for more details.
6686
+ if (state.containerGroups.find(function (g) {
6687
+ return g.posTabIndexesFound;
6688
+ }) && state.containerGroups.length > 1) {
6689
+ throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
6690
+ }
6538
6691
  };
6539
6692
  var tryFocus = function tryFocus(node) {
6540
6693
  if (node === false) {
@@ -6550,6 +6703,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6550
6703
  node.focus({
6551
6704
  preventScroll: !!config.preventScroll
6552
6705
  });
6706
+ // NOTE: focus() API does not trigger focusIn event so set MRU node manually
6553
6707
  state.mostRecentlyFocusedNode = node;
6554
6708
  if (isSelectableInput(node)) {
6555
6709
  node.select();
@@ -6560,64 +6714,23 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6560
6714
  return node ? node : node === false ? false : previousActiveElement;
6561
6715
  };
6562
6716
 
6563
- // This needs to be done on mousedown and touchstart instead of click
6564
- // so that it precedes the focus event.
6565
- var checkPointerDown = function checkPointerDown(e) {
6566
- var target = getActualTarget(e);
6567
- if (findContainerIndex(target, e) >= 0) {
6568
- // allow the click since it ocurred inside the trap
6569
- return;
6570
- }
6571
- if (valueOrHandler(config.clickOutsideDeactivates, e)) {
6572
- // immediately deactivate the trap
6573
- trap.deactivate({
6574
- // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
6575
- // which will result in the outside click setting focus to the node
6576
- // that was clicked (and if not focusable, to "nothing"); by setting
6577
- // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
6578
- // on activation (or the configured `setReturnFocus` node), whether the
6579
- // outside click was on a focusable node or not
6580
- returnFocus: config.returnFocusOnDeactivate
6581
- });
6582
- return;
6583
- }
6584
-
6585
- // This is needed for mobile devices.
6586
- // (If we'll only let `click` events through,
6587
- // then on mobile they will be blocked anyways if `touchstart` is blocked.)
6588
- if (valueOrHandler(config.allowOutsideClick, e)) {
6589
- // allow the click outside the trap to take place
6590
- return;
6591
- }
6592
-
6593
- // otherwise, prevent the click
6594
- e.preventDefault();
6595
- };
6596
-
6597
- // In case focus escapes the trap for some strange reason, pull it back in.
6598
- var checkFocusIn = function checkFocusIn(e) {
6599
- var target = getActualTarget(e);
6600
- var targetContained = findContainerIndex(target, e) >= 0;
6601
-
6602
- // In Firefox when you Tab out of an iframe the Document is briefly focused.
6603
- if (targetContained || target instanceof Document) {
6604
- if (targetContained) {
6605
- state.mostRecentlyFocusedNode = target;
6606
- }
6607
- } else {
6608
- // escaped! pull it back in to where it just left
6609
- e.stopImmediatePropagation();
6610
- tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
6611
- }
6612
- };
6613
-
6614
- // Hijack key nav events on the first and last focusable nodes of the trap,
6615
- // in order to prevent focus from escaping. If it escapes for even a
6616
- // moment it can end up scrolling the page and causing confusion so we
6617
- // kind of need to capture the action at the keydown phase.
6618
- var checkKeyNav = function checkKeyNav(event) {
6619
- var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
6620
- var target = getActualTarget(event);
6717
+ /**
6718
+ * Finds the next node (in either direction) where focus should move according to a
6719
+ * keyboard focus-in event.
6720
+ * @param {Object} params
6721
+ * @param {Node} [params.target] Known target __from which__ to navigate, if any.
6722
+ * @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event
6723
+ * will be used to determine the `target`). Ignored if `target` is specified.
6724
+ * @param {boolean} [params.isBackward] True if focus should move backward.
6725
+ * @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be
6726
+ * determined given the current state of the trap.
6727
+ */
6728
+ var findNextNavNode = function findNextNavNode(_ref2) {
6729
+ var target = _ref2.target,
6730
+ event = _ref2.event,
6731
+ _ref2$isBackward = _ref2.isBackward,
6732
+ isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;
6733
+ target = target || getActualTarget(event);
6621
6734
  updateTabbableNodes();
6622
6735
  var destinationNode = null;
6623
6736
  if (state.tabbableGroups.length > 0) {
@@ -6640,8 +6753,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6640
6753
  // REVERSE
6641
6754
 
6642
6755
  // is the target the first tabbable node in a group?
6643
- var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
6644
- var firstTabbableNode = _ref2.firstTabbableNode;
6756
+ var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
6757
+ var firstTabbableNode = _ref3.firstTabbableNode;
6645
6758
  return target === firstTabbableNode;
6646
6759
  });
6647
6760
  if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
@@ -6659,7 +6772,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6659
6772
  // the LAST group if it's the first tabbable node of the FIRST group)
6660
6773
  var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
6661
6774
  var destinationGroup = state.tabbableGroups[destinationGroupIndex];
6662
- destinationNode = destinationGroup.lastTabbableNode;
6775
+ destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;
6663
6776
  } else if (!isTabEvent(event)) {
6664
6777
  // user must have customized the nav keys so we have to move focus manually _within_
6665
6778
  // the active group: do this based on the order determined by tabbable()
@@ -6669,8 +6782,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6669
6782
  // FORWARD
6670
6783
 
6671
6784
  // is the target the last tabbable node in a group?
6672
- var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
6673
- var lastTabbableNode = _ref3.lastTabbableNode;
6785
+ var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref4) {
6786
+ var lastTabbableNode = _ref4.lastTabbableNode;
6674
6787
  return target === lastTabbableNode;
6675
6788
  });
6676
6789
  if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
@@ -6688,7 +6801,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6688
6801
  // group if it's the last tabbable node of the LAST group)
6689
6802
  var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
6690
6803
  var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
6691
- destinationNode = _destinationGroup.firstTabbableNode;
6804
+ destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;
6692
6805
  } else if (!isTabEvent(event)) {
6693
6806
  // user must have customized the nav keys so we have to move focus manually _within_
6694
6807
  // the active group: do this based on the order determined by tabbable()
@@ -6700,6 +6813,153 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
6700
6813
  // NOTE: the fallbackFocus option does not support returning false to opt-out
6701
6814
  destinationNode = getNodeForOption('fallbackFocus');
6702
6815
  }
6816
+ return destinationNode;
6817
+ };
6818
+
6819
+ // This needs to be done on mousedown and touchstart instead of click
6820
+ // so that it precedes the focus event.
6821
+ var checkPointerDown = function checkPointerDown(e) {
6822
+ var target = getActualTarget(e);
6823
+ if (findContainerIndex(target, e) >= 0) {
6824
+ // allow the click since it ocurred inside the trap
6825
+ return;
6826
+ }
6827
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
6828
+ // immediately deactivate the trap
6829
+ trap.deactivate({
6830
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
6831
+ // which will result in the outside click setting focus to the node
6832
+ // that was clicked (and if not focusable, to "nothing"); by setting
6833
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
6834
+ // on activation (or the configured `setReturnFocus` node), whether the
6835
+ // outside click was on a focusable node or not
6836
+ returnFocus: config.returnFocusOnDeactivate
6837
+ });
6838
+ return;
6839
+ }
6840
+
6841
+ // This is needed for mobile devices.
6842
+ // (If we'll only let `click` events through,
6843
+ // then on mobile they will be blocked anyways if `touchstart` is blocked.)
6844
+ if (valueOrHandler(config.allowOutsideClick, e)) {
6845
+ // allow the click outside the trap to take place
6846
+ return;
6847
+ }
6848
+
6849
+ // otherwise, prevent the click
6850
+ e.preventDefault();
6851
+ };
6852
+
6853
+ // In case focus escapes the trap for some strange reason, pull it back in.
6854
+ // NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected
6855
+ // scrolling if the node that got focused was out of view; there's nothing we can do to
6856
+ // prevent that from happening by the time we discover that focus escaped
6857
+ var checkFocusIn = function checkFocusIn(event) {
6858
+ var target = getActualTarget(event);
6859
+ var targetContained = findContainerIndex(target, event) >= 0;
6860
+
6861
+ // In Firefox when you Tab out of an iframe the Document is briefly focused.
6862
+ if (targetContained || target instanceof Document) {
6863
+ if (targetContained) {
6864
+ state.mostRecentlyFocusedNode = target;
6865
+ }
6866
+ } else {
6867
+ // escaped! pull it back in to where it just left
6868
+ event.stopImmediatePropagation();
6869
+
6870
+ // focus will escape if the MRU node had a positive tab index and user tried to nav forward;
6871
+ // it will also escape if the MRU node had a 0 tab index and user tried to nav backward
6872
+ // toward a node with a positive tab index
6873
+ var nextNode; // next node to focus, if we find one
6874
+ var navAcrossContainers = true;
6875
+ if (state.mostRecentlyFocusedNode) {
6876
+ if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {
6877
+ // MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...
6878
+ var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);
6879
+ // there MAY not be any tabbable nodes in the container if there are at least 2 containers
6880
+ // and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container
6881
+ // with at least one tabbable node in order to function, so this could be the other container
6882
+ // with nothing tabbable in it)
6883
+ var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;
6884
+ if (tabbableNodes.length > 0) {
6885
+ // MRU tab index MAY not be found if the MRU node is focusable but not tabbable
6886
+ var mruTabIdx = tabbableNodes.findIndex(function (node) {
6887
+ return node === state.mostRecentlyFocusedNode;
6888
+ });
6889
+ if (mruTabIdx >= 0) {
6890
+ if (config.isKeyForward(state.recentNavEvent)) {
6891
+ if (mruTabIdx + 1 < tabbableNodes.length) {
6892
+ nextNode = tabbableNodes[mruTabIdx + 1];
6893
+ navAcrossContainers = false;
6894
+ }
6895
+ // else, don't wrap within the container as focus should move to next/previous
6896
+ // container
6897
+ } else {
6898
+ if (mruTabIdx - 1 >= 0) {
6899
+ nextNode = tabbableNodes[mruTabIdx - 1];
6900
+ navAcrossContainers = false;
6901
+ }
6902
+ // else, don't wrap within the container as focus should move to next/previous
6903
+ // container
6904
+ }
6905
+ // else, don't find in container order without considering direction too
6906
+ }
6907
+ }
6908
+ // else, no tabbable nodes in that container (which means we must have at least one other
6909
+ // container with at least one tabbable node in it, otherwise focus-trap would've thrown
6910
+ // an error the last time updateTabbableNodes() was run): find next node among all known
6911
+ // containers
6912
+ } else {
6913
+ // check to see if there's at least one tabbable node with a positive tab index inside
6914
+ // the trap because focus seems to escape when navigating backward from a tabbable node
6915
+ // with tabindex=0 when this is the case (instead of wrapping to the tabbable node with
6916
+ // the greatest positive tab index like it should)
6917
+ if (!state.containerGroups.some(function (g) {
6918
+ return g.tabbableNodes.some(function (n) {
6919
+ return getTabIndex(n) > 0;
6920
+ });
6921
+ })) {
6922
+ // no containers with tabbable nodes with positive tab indexes which means the focus
6923
+ // escaped for some other reason and we should just execute the fallback to the
6924
+ // MRU node or initial focus node, if any
6925
+ navAcrossContainers = false;
6926
+ }
6927
+ }
6928
+ } else {
6929
+ // no MRU node means we're likely in some initial condition when the trap has just
6930
+ // been activated and initial focus hasn't been given yet, in which case we should
6931
+ // fall through to trying to focus the initial focus node, which is what should
6932
+ // happen below at this point in the logic
6933
+ navAcrossContainers = false;
6934
+ }
6935
+ if (navAcrossContainers) {
6936
+ nextNode = findNextNavNode({
6937
+ // move FROM the MRU node, not event-related node (which will be the node that is
6938
+ // outside the trap causing the focus escape we're trying to fix)
6939
+ target: state.mostRecentlyFocusedNode,
6940
+ isBackward: config.isKeyBackward(state.recentNavEvent)
6941
+ });
6942
+ }
6943
+ if (nextNode) {
6944
+ tryFocus(nextNode);
6945
+ } else {
6946
+ tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
6947
+ }
6948
+ }
6949
+ state.recentNavEvent = undefined; // clear
6950
+ };
6951
+
6952
+ // Hijack key nav events on the first and last focusable nodes of the trap,
6953
+ // in order to prevent focus from escaping. If it escapes for even a
6954
+ // moment it can end up scrolling the page and causing confusion so we
6955
+ // kind of need to capture the action at the keydown phase.
6956
+ var checkKeyNav = function checkKeyNav(event) {
6957
+ var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
6958
+ state.recentNavEvent = event;
6959
+ var destinationNode = findNextNavNode({
6960
+ event: event,
6961
+ isBackward: isBackward
6962
+ });
6703
6963
  if (destinationNode) {
6704
6964
  if (isTabEvent(event)) {
6705
6965
  // since tab natively moves focus, we wouldn't have a destination node unless we
@@ -6963,16 +7223,22 @@ const CatDropdown = class {
6963
7223
  this.overflow = false;
6964
7224
  }
6965
7225
  clickHandler(event) {
6966
- // we need to delay the initialization of the trigger until first,
7226
+ // we need to delay the initialization of the trigger until first
6967
7227
  // interaction because the element might still be hidden (and thus not
6968
7228
  // tabbable) if contained in another Stencil web component
6969
7229
  if (!this.trigger) {
6970
7230
  this.initTrigger();
6971
7231
  this.toggle();
6972
7232
  }
6973
- const button = event.target;
6974
- // hide dropdown on button click
6975
- if (!this.noAutoClose && event.composedPath().includes(this.content) && button.slot !== 'trigger') {
7233
+ // hide dropdown on button clicks inside the dropdown content
7234
+ const path = event.composedPath();
7235
+ if (!this.noAutoClose &&
7236
+ // check if click was inside of the dropdown content
7237
+ path.includes(this.content) &&
7238
+ // check if click was not on a trigger for a sub-dropdown
7239
+ event.target?.slot !== 'trigger' &&
7240
+ // check if click was not an element marked with data-dropdown-no-close
7241
+ !path.slice(0, path.indexOf(this.content)).find(el => this.hasAttribute(el, 'data-dropdown-no-close'))) {
6976
7242
  this.close();
6977
7243
  }
6978
7244
  }
@@ -6986,8 +7252,8 @@ const CatDropdown = class {
6986
7252
  * Opens the dropdown.
6987
7253
  */
6988
7254
  async open() {
6989
- if (this.isOpen === null) {
6990
- return; // busy
7255
+ if (this.isOpen === null || this.isOpen) {
7256
+ return; // busy or open
6991
7257
  }
6992
7258
  this.isOpen = null;
6993
7259
  this.content.style.display = 'block';
@@ -7004,15 +7270,11 @@ const CatDropdown = class {
7004
7270
  getShadowRoot: true
7005
7271
  },
7006
7272
  allowOutsideClick: true,
7007
- clickOutsideDeactivates: event => {
7008
- const shouldClose = !this.noAutoClose &&
7009
- !event.composedPath().includes(this.content) &&
7010
- (!this.trigger || !event.composedPath().includes(this.trigger));
7011
- if (shouldClose) {
7012
- this.close();
7013
- }
7014
- return shouldClose;
7015
- },
7273
+ clickOutsideDeactivates: event => !this.noAutoClose &&
7274
+ // check if click was outside of the dropdown content
7275
+ !event.composedPath().includes(this.content) &&
7276
+ // check if click was not on an element marked with data-dropdown-no-close
7277
+ !event.composedPath().find(el => this.hasAttribute(el, 'data-dropdown-no-close')),
7016
7278
  onPostDeactivate: () => this.close()
7017
7279
  });
7018
7280
  this.trap.activate();
@@ -7022,8 +7284,8 @@ const CatDropdown = class {
7022
7284
  * Closes the dropdown.
7023
7285
  */
7024
7286
  async close() {
7025
- if (this.isOpen === null || !this.isOpen) {
7026
- return; // busy
7287
+ if (!this.isOpen) {
7288
+ return; // busy or closed
7027
7289
  }
7028
7290
  this.isOpen = null;
7029
7291
  this.content.classList.remove('show');
@@ -7114,6 +7376,9 @@ const CatDropdown = class {
7114
7376
  });
7115
7377
  }
7116
7378
  }
7379
+ hasAttribute(elem, attr) {
7380
+ return elem instanceof HTMLElement && elem.hasAttribute(attr);
7381
+ }
7117
7382
  };
7118
7383
  CatDropdown.OFFSET = 4;
7119
7384
  CatDropdown.style = catDropdownCss;
@@ -7188,7 +7453,7 @@ function isNumberValue(value) {
7188
7453
  return !isNaN(parseFloat(value)) && !isNaN(Number(value));
7189
7454
  }
7190
7455
 
7191
- const catInputCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-container .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}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);margin-bottom:1rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.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:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.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;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable{padding-right:1.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}";
7456
+ const catInputCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.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}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.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}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);margin-bottom:1rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.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:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.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;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable{padding-right:1.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}";
7192
7457
 
7193
7458
  let nextUniqueId$6 = 0;
7194
7459
  const CatInput = class {
@@ -7281,7 +7546,7 @@ const CatInput = class {
7281
7546
  return (index.h("div", { class: {
7282
7547
  'input-field': true,
7283
7548
  'input-horizontal': this.horizontal
7284
- } }, index.h("div", { class: "label-container" }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, index.h("span", { class: "label-wrapper", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && this.requiredMarker.startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), index.h("div", { class: "input-container" }, index.h("div", { class: {
7549
+ } }, index.h("div", { class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id }, index.h("span", { class: "label-wrapper", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && this.requiredMarker.startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), index.h("div", { class: "input-container" }, index.h("div", { class: {
7285
7550
  'input-wrapper': true,
7286
7551
  'input-round': this.round,
7287
7552
  'input-readonly': this.readonly,
@@ -7289,7 +7554,7 @@ const CatInput = class {
7289
7554
  'input-invalid': this.invalid
7290
7555
  }, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && index.h("cat-icon", { icon: this.icon, class: "icon-prefix", size: "l" }), index.h("div", { class: "input-inner-wrapper" }, index.h("input", { ...this.nativeAttributes, ref: el => (this.input = el), id: this.id, class: {
7291
7556
  'has-clearable': this.clearable && !this.disabled && !this.readonly
7292
- }, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hint?.length ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this) }))), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l" })), this.invalid && index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }), this.textSuffix && (index.h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), (this.hint || this.hasSlottedHint || !!Object.keys(this.errorMap || {}).length) && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
7557
+ }, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hint?.length ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true }))), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l" })), this.invalid && index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }), this.textSuffix && (index.h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), (this.hint || this.hasSlottedHint || !!Object.keys(this.errorMap || {}).length) && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
7293
7558
  }
7294
7559
  get invalid() {
7295
7560
  return !!this.errorMap;
@@ -7752,7 +8017,7 @@ var autosizeInput = function (element, options) {
7752
8017
  }
7753
8018
  };
7754
8019
 
7755
- const catSelectCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-container .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}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}: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}.select-field,.select-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.select-field.select-horizontal{flex-direction:row;gap:1rem}.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, 81, 92, 108))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;padding:0.25rem;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.select-wrapper:not(.select-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.select-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.select-wrapper.select-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.select-wrapper:has(input:-webkit-autofill),.select-wrapper:has(input:-webkit-autofill):hover,.select-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}: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, 81, 92, 108));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{display:inline-block;padding-left:0.5rem}.select-wrapper-inner>cat-avatar+.select-input{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.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 125ms linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.icon-suffix{padding:0.25rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:fixed;right:0;background:white;display:none;overflow:auto;box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);width:max-content;top:0;left:0}.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}.select-option-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.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, 81, 92, 108))}";
8020
+ const catSelectCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.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}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.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}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}: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}.select-field,.select-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.select-field.select-horizontal{flex-direction:row;gap:1rem}.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, 81, 92, 108))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;padding:0.25rem;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.select-wrapper:not(.select-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.select-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.select-wrapper.select-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.select-wrapper:has(input:-webkit-autofill),.select-wrapper:has(input:-webkit-autofill):hover,.select-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}: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, 81, 92, 108));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{display:inline-block;padding-left:0.5rem}.select-wrapper-inner>cat-avatar+.select-input{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.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 125ms linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.icon-suffix{padding:0.25rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:fixed;right:0;background:white;display:none;overflow:auto;box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);width:max-content;top:0;left:0}.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}.select-option-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.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, 81, 92, 108))}";
7756
8021
 
7757
8022
  const INIT_STATE = {
7758
8023
  term: '',
@@ -7899,14 +8164,25 @@ const CatSelect = class {
7899
8164
  }
7900
8165
  this.hide();
7901
8166
  // Conditionally remove selection if the option was not manually selected through click or enter key press
7902
- if (!this.multiple && (!this.tags || !this.state.selection?.length) && this.state.tempSelection?.length) {
7903
- this.patchState({
7904
- activeSelectionIndex: -1,
7905
- selection: this.state.tempSelection,
7906
- tempSelection: [],
7907
- options: [],
7908
- term: this.state.tempSelection[0].render.label
7909
- });
8167
+ if (!this.multiple && (!this.tags || !this.state.selection?.length)) {
8168
+ if (this.state.tempSelection?.length) {
8169
+ this.patchState({
8170
+ activeSelectionIndex: -1,
8171
+ selection: this.state.tempSelection,
8172
+ tempSelection: [],
8173
+ options: [],
8174
+ term: this.state.tempSelection[0].render.label
8175
+ });
8176
+ }
8177
+ else if (!this.state.selection?.length) {
8178
+ this.patchState({
8179
+ activeSelectionIndex: -1,
8180
+ selection: [],
8181
+ tempSelection: [],
8182
+ options: [],
8183
+ term: ''
8184
+ });
8185
+ }
7910
8186
  }
7911
8187
  else {
7912
8188
  this.patchState({ activeSelectionIndex: -1 });
@@ -8036,17 +8312,14 @@ const CatSelect = class {
8036
8312
  return (index.h(index.Host, null, index.h("div", { class: {
8037
8313
  'select-field': true,
8038
8314
  'select-horizontal': this.horizontal
8039
- } }, index.h("div", { class: "label-container" }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, index.h("span", { class: "label-wrapper", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && this.requiredMarker.startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { class: "select-container" }, index.h("div", { class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, index.h("div", { class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (index.h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (index.h("span", { class: {
8315
+ } }, index.h("div", { class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id }, index.h("span", { class: "label-wrapper", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && this.requiredMarker.startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { class: "select-container" }, index.h("div", { class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, index.h("div", { class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (index.h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (index.h("span", { class: {
8040
8316
  pill: true,
8041
8317
  'select-no-open': true,
8042
8318
  'select-option-active': this.state.activeSelectionIndex === i
8043
- }, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: of.catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, onCatClick: event => event.stopPropagation() }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (index.h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, index.h("input", { ...this.nativeAttributes, class: "select-input", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hint?.length ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && index.h("cat-spinner", null), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
8319
+ }, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: of.catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (index.h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, index.h("input", { ...this.nativeAttributes, class: "select-input", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hint?.length ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && index.h("cat-spinner", null), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
8044
8320
  !this.disabled &&
8045
8321
  !this.state.isResolving &&
8046
- this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: of.catI18nRegistry.t('input.clear'), onCatClick: event => {
8047
- event.stopPropagation();
8048
- this.clear();
8049
- } })) : null, !this.state.isResolving && (index.h("cat-button", { iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? of.catI18nRegistry.t('select.close') : of.catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, onCatClick: event => event.stopPropagation() }))), (this.hint || this.hasSlottedHint || !!Object.keys(this.errorMap || {}).length) && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (index.h("cat-scrollable", { class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, index.h("ul", { class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isLoading
8322
+ this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: of.catI18nRegistry.t('input.clear'), onCatClick: () => this.clear(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (index.h("cat-button", { iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? of.catI18nRegistry.t('select.close') : of.catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), (this.hint || this.hasSlottedHint || !!Object.keys(this.errorMap || {}).length) && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (index.h("cat-scrollable", { class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, index.h("ul", { class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isLoading
8050
8323
  ? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (index.h("li", { class: "select-option-loading" }, index.h("cat-skeleton", { variant: "body", lines: 1 }), index.h("cat-skeleton", { variant: "body", lines: 1 }))))
8051
8324
  : !this.state.options.length &&
8052
8325
  !this.tags && (index.h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : of.catI18nRegistry.t('select.empty')))))))));
@@ -8140,7 +8413,7 @@ const CatSelect = class {
8140
8413
  newSelection = [item];
8141
8414
  this.search(item.render.label);
8142
8415
  }
8143
- this.patchState({ selection: newSelection });
8416
+ this.patchState({ selection: newSelection, tempSelection: [] });
8144
8417
  if (this.multiple && this.state.term.trim() && this.input) {
8145
8418
  this.patchState({ term: '', activeOptionIndex: -1 });
8146
8419
  this.term$.next('');
@@ -8166,7 +8439,7 @@ const CatSelect = class {
8166
8439
  }
8167
8440
  clear() {
8168
8441
  if (this.input && this.state.term) {
8169
- this.patchState({ selection: [], options: [], term: '', activeOptionIndex: -1, tempSelection: [] });
8442
+ this.patchState({ selection: [], term: '', activeOptionIndex: -1, tempSelection: [] });
8170
8443
  this.term$.next('');
8171
8444
  this.input.value = '';
8172
8445
  }
@@ -8532,7 +8805,7 @@ const CatSelectTest = class {
8532
8805
  setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);
8533
8806
  }
8534
8807
  render() {
8535
- 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: () => console.log('Multiple change', this.multipleSelect?.value), onCatBlur: e => console.log('Multiple blur', e), multiple: true, noItems: "No results", clearable: true, errorUpdate: false }, 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, errorUpdate: false }), index.h("cat-select", { label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), 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: () => console.log('Multiple tagging change', this.multipleSelectTagging?.value), multiple: true, tags: true, clearable: true, errorUpdate: false }), 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, errorUpdate: false }), index.h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', placeholder: "Search for a country or capital", clearable: true, errorUpdate: false }), index.h("cat-select", { label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), index.h("cat-dropdown", { overflow: true, noAutoClose: true }, index.h("cat-button", { slot: "trigger", style: { width: '50%' } }, "Open select"), index.h("div", { slot: "content", style: { width: '400px' } }, 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: () => console.log('Single change', this.singleSelectTagging?.value), tagHint: "new country", tags: true, clearable: true, errorUpdate: false, style: { width: '90%' } })))));
8808
+ 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: () => console.log('Multiple change', this.multipleSelect?.value), onCatBlur: e => console.log('Multiple blur', e), multiple: true, noItems: "No results", clearable: true, errorUpdate: false }, 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, errorUpdate: false }), index.h("cat-select", { label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), 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: () => console.log('Multiple tagging change', this.multipleSelectTagging?.value), multiple: true, tags: true, clearable: true, errorUpdate: false }), 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, errorUpdate: false }), index.h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', placeholder: "Search for a country or capital", clearable: true, errorUpdate: false }), index.h("cat-select", { label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), index.h("cat-dropdown", { overflow: true }, index.h("cat-button", { slot: "trigger", style: { width: '50%' } }, "Open select"), index.h("div", { slot: "content", style: { width: '400px' } }, 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: () => console.log('Single change', this.singleSelectTagging?.value), tagHint: "new country", tags: true, clearable: true, errorUpdate: false, style: { width: '90%' } })))));
8536
8809
  }
8537
8810
  get countryConnector() {
8538
8811
  return {
@@ -9864,7 +10137,7 @@ const CatTab = class {
9864
10137
  };
9865
10138
  CatTab.style = catTabCss;
9866
10139
 
9867
- const catTabsCss = ":host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color-dark, 215, 219, 224))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab::after{opacity:0;content:\"\";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-active::after{opacity:1}";
10140
+ const catTabsCss = ":host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:\"\";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-active::after{opacity:1}";
9868
10141
 
9869
10142
  const CatTabs = class {
9870
10143
  constructor(hostRef) {
@@ -9912,7 +10185,7 @@ const CatTabs = class {
9912
10185
  return (index.h("cat-button", { ref: el => el && this.updateButtonsRef(el), buttonId: tab.id, role: "tab", part: "tab", class: {
9913
10186
  'cat-tab': true,
9914
10187
  'cat-tab-active': Boolean(this.activeTabId && tab.id === this.activeTabId)
9915
- }, active: Boolean(this.activeTabId && tab.id === this.activeTabId), color: this.activeTabId && tab.id === this.activeTabId ? 'primary' : 'secondary', variant: "text", icon: tab.icon, iconOnly: tab.iconOnly, iconRight: tab.iconRight, url: tab.url, disabled: tab.deactivated, urlTarget: tab.urlTarget, onCatClick: () => (this.activeTabId = tab.id), nativeAttributes: { ...tab.nativeAttributes }, nativeContentAttributes: { 'data-text': tab.label } }, tab.label));
10188
+ }, active: Boolean(this.activeTabId && tab.id === this.activeTabId), color: this.activeTabId && tab.id === this.activeTabId ? 'primary' : 'secondary', variant: "text", icon: tab.icon, iconOnly: tab.iconOnly, iconRight: tab.iconRight, url: tab.url, disabled: tab.deactivated, urlTarget: tab.urlTarget, onCatClick: () => (this.activeTabId = tab.id), nativeAttributes: { ...tab.nativeAttributes }, nativeContentAttributes: { 'data-text': tab.label }, "data-dropdown-no-close": true }, tab.label));
9916
10189
  })));
9917
10190
  }
9918
10191
  updateButtonsRef(button) {
@@ -9936,7 +10209,7 @@ CatTabs.style = catTabsCss;
9936
10209
 
9937
10210
  var e=new Map;function t(t){var o=e.get(t);o&&o.destroy();}function o(t){var o=e.get(t);o&&o.update();}var r=null;"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var o,r=null,n=window.getComputedStyle(t),i=(o=t.value,function(){a({testForHeightReduction:""===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value;}),l=function(o){t.removeEventListener("autosize:destroy",l),t.removeEventListener("autosize:update",s),t.removeEventListener("input",i),window.removeEventListener("resize",s),Object.keys(o).forEach(function(e){return t.style[e]=o[e]}),e.delete(t);}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l),t.addEventListener("autosize:update",s),t.addEventListener("input",i),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:l,update:s}),s();}function a(e){var o,i,l=e.restoreTextAlign,s=void 0===l?null:l,d=e.testForHeightReduction,u=void 0===d||d,c=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],o=e[1];t.style.scrollBehavior="auto",t.scrollTop=o,t.style.scrollBehavior=null;})}}(t),t.style.height=""),i="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&i>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),i=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=i+"px",s&&(t.style.textAlign=s),o&&o(),r!==i&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),r=i),c!==n.overflow&&!s)){var v=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===v?"end":"start"),a({restoreTextAlign:v,testForHeightReduction:!0});}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null});}}(t)}),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r;
9938
10211
 
9939
- const catTextareaCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-container .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}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}: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}.textarea-field,.textarea-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.textarea-field.textarea-horizontal{flex-direction:row;gap:1rem}.textarea-readonly{pointer-events:none}.textarea-wrapper{position:relative;display:flex;flex-direction:column}.icon-suffix{position:absolute;top:calc(0.625rem - 2px);right:0.75rem;background:rgba(255, 255, 255, 0.75);border-radius:100rem}.textarea-disabled .icon-suffix{background:rgba(242, 244, 247, 0.75)}textarea{margin:0;padding:0.625rem 0.75rem;box-sizing:border-box;min-height:2.5rem;font:inherit;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;resize:vertical;--border-color:var(--cat-border-color-dark, 215, 219, 224);}textarea:disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));resize:none}textarea:not(:disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.textarea-invalid textarea{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}";
10212
+ const catTextareaCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.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}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.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}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}: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}.textarea-field,.textarea-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.textarea-field.textarea-horizontal{flex-direction:row;gap:1rem}.textarea-readonly{pointer-events:none}.textarea-wrapper{position:relative;display:flex;flex-direction:column}.icon-suffix{position:absolute;top:calc(0.625rem - 2px);right:0.75rem;background:rgba(255, 255, 255, 0.75);border-radius:100rem}.textarea-disabled .icon-suffix{background:rgba(242, 244, 247, 0.75)}textarea{margin:0;padding:0.625rem 0.75rem;box-sizing:border-box;min-height:2.5rem;font:inherit;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;resize:vertical;--border-color:var(--cat-border-color-dark, 215, 219, 224);}textarea:disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));resize:none}textarea:not(:disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.textarea-invalid textarea{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}";
9940
10213
 
9941
10214
  let nextUniqueId$2 = 0;
9942
10215
  const CatTextarea = class {
@@ -10023,7 +10296,7 @@ const CatTextarea = class {
10023
10296
  return (index.h(index.Host, null, index.h("div", { class: {
10024
10297
  'textarea-field': true,
10025
10298
  'textarea-horizontal': this.horizontal
10026
- } }, index.h("div", { class: "label-container" }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, index.h("span", { class: "label-wrapper", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && this.requiredMarker.startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.length ?? 0, "/", this.maxLength))))))), index.h("div", { class: "textarea-container" }, index.h("div", { class: {
10299
+ } }, index.h("div", { class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id }, index.h("span", { class: "label-wrapper", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && this.requiredMarker.startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.length ?? 0, "/", this.maxLength))))))), index.h("div", { class: "textarea-container" }, index.h("div", { class: {
10027
10300
  'textarea-wrapper': true,
10028
10301
  'textarea-readonly': this.readonly,
10029
10302
  'textarea-disabled': this.disabled,