@haiilo/catalyst 10.4.0 → 10.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/catalyst/catalyst.css +2 -2
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/index.esm.js +1 -1
  5. package/dist/catalyst/index.esm.js.map +1 -1
  6. package/dist/catalyst/p-2c8ac8cf.js +2 -0
  7. package/dist/catalyst/p-2c8ac8cf.js.map +1 -0
  8. package/dist/catalyst/p-b2ec6eb3.entry.js +10 -0
  9. package/dist/catalyst/p-b2ec6eb3.entry.js.map +1 -0
  10. package/dist/catalyst/scss/_variables.scss +0 -1
  11. package/dist/catalyst/scss/core/_form.scss +2 -2
  12. package/dist/cjs/{cat-alert_28.cjs.entry.js → cat-alert_29.cjs.entry.js} +387 -218
  13. package/dist/cjs/cat-alert_29.cjs.entry.js.map +1 -0
  14. package/dist/cjs/catalyst.cjs.js +1 -1
  15. package/dist/cjs/index.cjs.js +4 -1
  16. package/dist/cjs/index.cjs.js.map +1 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/cjs/{of-45281229.js → of-f2844da8.js} +12 -4
  19. package/dist/cjs/of-f2844da8.js.map +1 -0
  20. package/dist/collection/collection-manifest.json +1 -0
  21. package/dist/collection/components/cat-button/cat-button.css +12 -2
  22. package/dist/collection/components/cat-checkbox/cat-checkbox.css +2 -1
  23. package/dist/collection/components/cat-date/cat-date.css +2 -96
  24. package/dist/collection/components/cat-date/cat-date.js +77 -245
  25. package/dist/collection/components/cat-date/cat-date.js.map +1 -1
  26. package/dist/collection/components/cat-date/cat-date.spec.js +2 -1
  27. package/dist/collection/components/cat-date/cat-date.spec.js.map +1 -1
  28. package/dist/collection/components/cat-date-inline/cat-date-inline.css +166 -0
  29. package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js +11 -0
  30. package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js.map +1 -0
  31. package/dist/collection/components/cat-date-inline/cat-date-inline.js +505 -0
  32. package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -0
  33. package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js +16 -0
  34. package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js.map +1 -0
  35. package/dist/collection/components/{cat-date → cat-date-inline}/cat-date-locale.js +22 -1
  36. package/dist/collection/components/cat-date-inline/cat-date-locale.js.map +1 -0
  37. package/dist/collection/components/cat-date-inline/cat-date-math.js.map +1 -0
  38. package/dist/collection/components/cat-datepicker/cat-datepicker.js +2 -2
  39. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +2 -2
  40. package/dist/collection/components/cat-dropdown/cat-dropdown.js +29 -2
  41. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  42. package/dist/collection/components/cat-form-group/cat-form-group.js +4 -1
  43. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  44. package/dist/collection/components/cat-i18n/cat-i18n-registry.js +6 -0
  45. package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -1
  46. package/dist/collection/components/cat-icon/cat-icon-registry.js +4 -2
  47. package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
  48. package/dist/collection/components/cat-icon/cat-icon.js +1 -1
  49. package/dist/collection/components/cat-input/cat-input.js +4 -4
  50. package/dist/collection/components/cat-notification/cat-notification.js +3 -0
  51. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  52. package/dist/collection/components/cat-pagination/cat-pagination.js +2 -2
  53. package/dist/collection/components/cat-radio/cat-radio.css +1 -1
  54. package/dist/collection/components/cat-radio/cat-radio.js +1 -1
  55. package/dist/collection/components/cat-radio-group/cat-radio-group.js +1 -1
  56. package/dist/collection/components/cat-scrollable/cat-scrollable.js +3 -3
  57. package/dist/collection/components/cat-select/cat-select.js +5 -5
  58. package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
  59. package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -1
  60. package/dist/collection/components/cat-spinner/cat-spinner.js +2 -2
  61. package/dist/collection/components/cat-tab/cat-tab.js +1 -1
  62. package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
  63. package/dist/collection/components/cat-textarea/cat-textarea.js +3 -3
  64. package/dist/collection/components/cat-time/cat-time-locale.js +3 -0
  65. package/dist/collection/components/cat-time/cat-time-locale.js.map +1 -1
  66. package/dist/collection/components/cat-time/cat-time.js +39 -8
  67. package/dist/collection/components/cat-time/cat-time.js.map +1 -1
  68. package/dist/collection/components/cat-toggle/cat-toggle.css +1 -1
  69. package/dist/collection/components/cat-toggle/cat-toggle.js +1 -1
  70. package/dist/collection/components/cat-tooltip/cat-tooltip.js +7 -2
  71. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  72. package/dist/collection/scss/_variables.scss +0 -1
  73. package/dist/collection/scss/core/_form.scss +2 -2
  74. package/dist/components/cat-button2.js +1 -1
  75. package/dist/components/cat-button2.js.map +1 -1
  76. package/dist/components/cat-checkbox2.js +1 -1
  77. package/dist/components/cat-checkbox2.js.map +1 -1
  78. package/dist/components/cat-date-inline.d.ts +11 -0
  79. package/dist/components/cat-date-inline.js +8 -0
  80. package/dist/components/cat-date-inline.js.map +1 -0
  81. package/dist/components/cat-date-inline2.js +386 -0
  82. package/dist/components/cat-date-inline2.js.map +1 -0
  83. package/dist/components/cat-date.js +83 -283
  84. package/dist/components/cat-date.js.map +1 -1
  85. package/dist/components/cat-datepicker-inline.js +2 -2
  86. package/dist/components/cat-datepicker.js +2 -2
  87. package/dist/components/cat-dropdown2.js +8 -2
  88. package/dist/components/cat-dropdown2.js.map +1 -1
  89. package/dist/components/cat-form-group.js +1 -1
  90. package/dist/components/cat-form-group.js.map +1 -1
  91. package/dist/components/cat-i18n-registry.js +6 -0
  92. package/dist/components/cat-i18n-registry.js.map +1 -1
  93. package/dist/components/cat-icon-registry.js +4 -2
  94. package/dist/components/cat-icon-registry.js.map +1 -1
  95. package/dist/components/cat-icon2.js +1 -1
  96. package/dist/components/cat-input2.js +4 -4
  97. package/dist/components/cat-pagination.js +2 -2
  98. package/dist/components/cat-radio-group.js +1 -1
  99. package/dist/components/cat-radio.js +2 -2
  100. package/dist/components/cat-radio.js.map +1 -1
  101. package/dist/components/cat-scrollable2.js +8 -6
  102. package/dist/components/cat-scrollable2.js.map +1 -1
  103. package/dist/components/cat-select-demo.js +3 -3
  104. package/dist/components/cat-select-demo.js.map +1 -1
  105. package/dist/components/cat-select2.js.map +1 -1
  106. package/dist/components/cat-skeleton2.js +1 -1
  107. package/dist/components/cat-spinner2.js +2 -2
  108. package/dist/components/cat-tab.js +1 -1
  109. package/dist/components/cat-tabs.js +1 -1
  110. package/dist/components/cat-textarea.js +3 -3
  111. package/dist/components/cat-time.js +37 -8
  112. package/dist/components/cat-time.js.map +1 -1
  113. package/dist/components/cat-toggle.js +2 -2
  114. package/dist/components/cat-toggle.js.map +1 -1
  115. package/dist/components/cat-tooltip.js +2 -2
  116. package/dist/components/cat-tooltip.js.map +1 -1
  117. package/dist/components/floating-ui.dom.esm.js +38 -30
  118. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  119. package/dist/components/from.js +1 -1
  120. package/dist/components/from.js.map +1 -1
  121. package/dist/components/index.js +3 -0
  122. package/dist/components/index.js.map +1 -1
  123. package/dist/components/of.js.map +1 -1
  124. package/dist/esm/{cat-alert_28.entry.js → cat-alert_29.entry.js} +387 -219
  125. package/dist/esm/cat-alert_29.entry.js.map +1 -0
  126. package/dist/esm/catalyst.js +1 -1
  127. package/dist/esm/index.js +5 -2
  128. package/dist/esm/index.js.map +1 -1
  129. package/dist/esm/loader.js +1 -1
  130. package/dist/esm/{of-19888f3b.js → of-53334b95.js} +12 -4
  131. package/dist/esm/of-53334b95.js.map +1 -0
  132. package/dist/types/components/cat-date/cat-date.d.ts +11 -31
  133. package/dist/types/components/cat-date-inline/cat-date-inline.d.ts +81 -0
  134. package/dist/types/components/{cat-date → cat-date-inline}/cat-date-locale.d.ts +5 -0
  135. package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +9 -0
  136. package/dist/types/components/cat-form-group/cat-form-group.d.ts +3 -0
  137. package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +6 -0
  138. package/dist/types/components/cat-icon/cat-icon-registry.d.ts +1 -0
  139. package/dist/types/components/cat-notification/cat-notification.d.ts +3 -0
  140. package/dist/types/components/cat-time/cat-time-locale.d.ts +1 -0
  141. package/dist/types/components/cat-time/cat-time.d.ts +6 -1
  142. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +5 -0
  143. package/dist/types/components.d.ts +209 -5
  144. package/package.json +2 -2
  145. package/dist/catalyst/p-81800b65.js +0 -2
  146. package/dist/catalyst/p-81800b65.js.map +0 -1
  147. package/dist/catalyst/p-8a1d505d.entry.js +0 -10
  148. package/dist/catalyst/p-8a1d505d.entry.js.map +0 -1
  149. package/dist/cjs/cat-alert_28.cjs.entry.js.map +0 -1
  150. package/dist/cjs/of-45281229.js.map +0 -1
  151. package/dist/collection/components/cat-date/cat-date-locale.js.map +0 -1
  152. package/dist/collection/components/cat-date/cat-date-math.js.map +0 -1
  153. package/dist/esm/cat-alert_28.entry.js.map +0 -1
  154. package/dist/esm/of-19888f3b.js.map +0 -1
  155. /package/dist/collection/components/{cat-date → cat-date-inline}/cat-date-math.js +0 -0
  156. /package/dist/types/components/{cat-date → cat-date-inline}/cat-date-math.d.ts +0 -0
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-13aff0b4.js');
6
- const of = require('./of-45281229.js');
6
+ const of = require('./of-f2844da8.js');
7
7
 
8
8
  const ObjectUnsubscribedError = of.createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
9
9
  _super(this);
@@ -179,6 +179,7 @@ class AsyncAction extends Action {
179
179
  this.pending = false;
180
180
  }
181
181
  schedule(state, delay = 0) {
182
+ var _a;
182
183
  if (this.closed) {
183
184
  return this;
184
185
  }
@@ -190,7 +191,7 @@ class AsyncAction extends Action {
190
191
  }
191
192
  this.pending = true;
192
193
  this.delay = delay;
193
- this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
194
+ this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);
194
195
  return this;
195
196
  }
196
197
  requestAsyncId(scheduler, _id, delay = 0) {
@@ -200,7 +201,9 @@ class AsyncAction extends Action {
200
201
  if (delay != null && this.delay === delay && this.pending === false) {
201
202
  return id;
202
203
  }
203
- intervalProvider.clearInterval(id);
204
+ if (id != null) {
205
+ intervalProvider.clearInterval(id);
206
+ }
204
207
  return undefined;
205
208
  }
206
209
  execute(state, delay) {
@@ -263,7 +266,6 @@ class AsyncScheduler extends Scheduler {
263
266
  super(SchedulerAction, now);
264
267
  this.actions = [];
265
268
  this._active = false;
266
- this._scheduled = undefined;
267
269
  }
268
270
  flush(action) {
269
271
  const { actions } = this;
@@ -653,7 +655,7 @@ function delayWhen(delayDurationSelector, subscriptionDelay) {
653
655
  if (subscriptionDelay) {
654
656
  return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));
655
657
  }
656
- return mergeMap((value, index) => delayDurationSelector(value, index).pipe(take(1), mapTo(value)));
658
+ return mergeMap((value, index) => of.innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));
657
659
  }
658
660
 
659
661
  function delay$1(due, scheduler = asyncScheduler) {
@@ -1044,7 +1046,7 @@ function createEmptyStyleRule(query) {
1044
1046
  }
1045
1047
  }
1046
1048
 
1047
- 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:var(--cat-font-weight-button, 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){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.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-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.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;height:1.5rem;padding: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;height:2rem;padding: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;height:2.5rem;padding: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;height:3rem;padding: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;height:3.5rem;padding: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-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text: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}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding-left:0;padding-right:0}";
1049
+ 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:var(--cat-font-weight-button, 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){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.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-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.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;height:1.5rem;padding: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;height:2rem;padding: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;height:2.5rem;padding: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;height:3rem;padding: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;height:3.5rem;padding: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-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text: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}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding:0;aspect-ratio:1}:host(.date-start:not(.date-end)) .cat-button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.date-end:not(.date-start)) .cat-button{border-top-left-radius:0;border-bottom-left-radius:0}";
1048
1050
  const CatButtonStyle0 = catButtonCss;
1049
1051
 
1050
1052
  const CatButton = class {
@@ -1265,7 +1267,7 @@ const CatFormHint = props => {
1265
1267
  ]));
1266
1268
  };
1267
1269
 
1268
- const catCheckboxCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.5rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box-placeholder{width:calc(1.25rem + 2px);flex-shrink:0}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 125ms ease, border-color 125ms ease;pointer-events:none}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 125ms ease;width:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .check{stroke-dashoffset:16px}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 81, 92, 108))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";
1270
+ const catCheckboxCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box-placeholder{width:calc(1.25rem + 2px);flex-shrink:0}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 125ms ease, border-color 125ms ease;pointer-events:none;box-sizing:border-box}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 125ms ease;width:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .check{stroke-dashoffset:16px}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 81, 92, 108))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";
1269
1271
  const CatCheckboxStyle0 = catCheckboxCss;
1270
1272
 
1271
1273
  let nextUniqueId$8 = 0;
@@ -1388,6 +1390,7 @@ function getLocale$2(language) {
1388
1390
  today: of.catI18nRegistry.t('datepicker.today'),
1389
1391
  change: of.catI18nRegistry.t('datepicker.change'),
1390
1392
  choose: of.catI18nRegistry.t('datepicker.choose'),
1393
+ clear: of.catI18nRegistry.t('datepicker.clear'),
1391
1394
  formatStr: getFormat$1(language),
1392
1395
  weekInfo: getWeekInfo(language),
1393
1396
  days: {
@@ -1397,7 +1400,27 @@ function getLocale$2(language) {
1397
1400
  months: {
1398
1401
  short: getMonths(language, 'short'),
1399
1402
  long: getMonths(language, 'long')
1400
- }
1403
+ },
1404
+ now: () => {
1405
+ const date = new Date();
1406
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
1407
+ },
1408
+ fromLocalISO: (date) => {
1409
+ const [match, year, month, day] = date?.match(/^(\d{4})-(\d{2})-(\d{2})/) ?? [];
1410
+ return match ? new Date(Number(year), Number(month) - 1, Number(day)) : null;
1411
+ },
1412
+ toLocalISO: (date) => {
1413
+ const year = date.getFullYear();
1414
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
1415
+ const day = date.getDate().toString().padStart(2, '0');
1416
+ return `${year}-${month}-${day}`;
1417
+ },
1418
+ toLocalStr: (date) => new Intl.DateTimeFormat(language, {
1419
+ year: 'numeric',
1420
+ month: 'long',
1421
+ day: 'numeric',
1422
+ weekday: 'long'
1423
+ }).format(date)
1401
1424
  };
1402
1425
  }
1403
1426
 
@@ -1429,7 +1452,7 @@ function clampDate(min, date, max) {
1429
1452
  return new Date(Math.min(Math.max(date.getTime(), min?.getTime() ?? -Infinity), max?.getTime() ?? Infinity));
1430
1453
  }
1431
1454
 
1432
- const catDateCss = ":host{display:block}:host([hidden]){display:none}.label-aria{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}.picker{padding:1rem;display:inline-flex;flex-direction:column}.picker-head{display:flex;gap:0.5rem;align-items:center}.picker-head h3{flex:1;text-align:center;margin:0}.picker-grid{display:grid;grid-template-rows:2rem repeat(6, 1fr);grid-template-columns:2rem repeat(7, 1fr);grid-template-areas:\". h h h h h h h\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\";margin:1rem 0 0.5rem}.picker-grid-head{grid-area:h;display:grid;grid-template-columns:repeat(7, 1fr);place-items:end center;padding-bottom:0.5rem}.picker-grid-weeks{grid-area:w;display:grid;grid-template-rows:repeat(6, 1fr);place-items:center right;padding-right:0.5rem}.picker-grid-days{grid-area:d;display:grid;grid-template-rows:repeat(6, 1fr);grid-template-columns:repeat(7, 1fr)}.picker-grid-head>*,.picker-grid-weeks>*{font-size:0.75rem;line-height:1rem;font-weight:600;color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;text-decoration:none}.date-other{opacity:0.5}.date-disabled{opacity:0.25}.picker-foot{display:flex;gap:1rem;align-items:center}.cursor-help{flex:1;margin:0;font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;text-align:center}.cursor-help.cursor-right{text-align:right}.cursor-aria{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}";
1455
+ const catDateCss = ":host{display:block}:host([hidden]){display:none}.label-aria{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}cat-date-inline{margin:1rem}";
1433
1456
  const CatDateStyle0 = catDateCss;
1434
1457
 
1435
1458
  const CatDate = class {
@@ -1440,13 +1463,8 @@ const CatDate = class {
1440
1463
  this.catBlur = index.createEvent(this, "catBlur", 7);
1441
1464
  this.language = of.catI18nRegistry.getLocale();
1442
1465
  this.locale = getLocale$2(this.language);
1443
- this.isOpen = false;
1444
- // additonally store the focus date to ensure correct focus after potential re-render
1445
- this.focusDate = null;
1446
1466
  this.hasSlottedLabel = false;
1447
1467
  this.hasSlottedHint = false;
1448
- this.viewDate = this.now;
1449
- this.selectionDate = null;
1450
1468
  this.requiredMarker = 'optional';
1451
1469
  this.horizontal = false;
1452
1470
  this.autoComplete = undefined;
@@ -1472,29 +1490,24 @@ const CatDate = class {
1472
1490
  this.nativeAttributes = undefined;
1473
1491
  this.placement = 'bottom-end';
1474
1492
  }
1475
- get maxDate() {
1476
- const [y, m, d] = this.max?.split('-').map(Number) || [];
1477
- return this.max ? new Date(y, m - 1, d) : null;
1478
- }
1479
- get minDate() {
1480
- const [y, m, d] = this.min?.split('-').map(Number) || [];
1481
- return this.min ? new Date(y, m - 1, d) : null;
1482
- }
1483
- get now() {
1484
- const date = new Date();
1485
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
1493
+ onMinChanged(min, oldMin) {
1494
+ if (min !== oldMin) {
1495
+ this.reclamp('min', min);
1496
+ }
1486
1497
  }
1487
- get focusedDate() {
1488
- const [all, year, month, day] = this.hostElement.shadowRoot
1489
- ?.querySelector(`[data-date]:focus`)
1490
- ?.dataset.date?.match(/^(\d{4})-(\d{2})-(\d{2})/) ?? [];
1491
- return all ? new Date(Number(year), Number(month) - 1, Number(day)) : null;
1498
+ onMaxChanged(max, oldMax) {
1499
+ if (max !== oldMax) {
1500
+ this.reclamp('max', max);
1501
+ }
1492
1502
  }
1493
- componentWillLoad() {
1503
+ get inputValue() {
1494
1504
  const [match, year, month, day] = this.value?.match(/^(\d{4})-(\d{2})-(\d{2})/) ?? [];
1495
1505
  if (match) {
1496
- this.select(new Date(Number(year), Number(month) - 1, Number(day)));
1506
+ const date = new Date(Number(year), Number(month) - 1, Number(day));
1507
+ const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });
1508
+ return format.format(date);
1497
1509
  }
1510
+ return '';
1498
1511
  }
1499
1512
  componentWillRender() {
1500
1513
  this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
@@ -1511,49 +1524,180 @@ const CatDate = class {
1511
1524
  datePattern: [p1, p2, p3]
1512
1525
  });
1513
1526
  }
1527
+ /**
1528
+ * Programmatically move focus to the input. Use this method instead of
1529
+ * `input.focus()`.
1530
+ *
1531
+ * @param options An optional object providing options to control aspects of
1532
+ * the focusing process.
1533
+ */
1534
+ async doFocus(options) {
1535
+ this.input?.doFocus(options);
1536
+ }
1537
+ /**
1538
+ * Programmatically remove focus from the input. Use this method instead of
1539
+ * `input.blur()`.
1540
+ */
1541
+ async doBlur() {
1542
+ this.input?.doBlur();
1543
+ }
1544
+ /**
1545
+ * Clear the input.
1546
+ */
1547
+ async clear() {
1548
+ this.input?.clear();
1549
+ }
1550
+ render() {
1551
+ return (index.h(index.Host, { key: 'd588c96f031fc8ab9518d13dfaac730a0d424caa' }, index.h("cat-input", { key: 'f49f0682e2f2fe3dfcd89477bda91fe46ed44dfa', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, value: this.inputValue, onCatFocus: e => {
1552
+ e.stopPropagation();
1553
+ this.catFocus.emit(e.detail);
1554
+ }, onCatBlur: e => {
1555
+ e.stopPropagation();
1556
+ this.onInputBlur(e.detail);
1557
+ } }, index.h("span", { key: '68ef0708d25128b9a52d60c5b1a7b34e0ffb2ef1', slot: "label" }, this.label, index.h("span", { key: 'ac017335567a4e0059631e7535455d52f61f2e43', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: '16a6e95f6e4f6a9b0ddd7716f0b713c8fac3fdff', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, index.h("cat-button", { key: 'cf7f2aaa2c5775b23f3e8826e9b0e722c4ce8be6', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), index.h("div", { key: 'f90eef976a3102855801df5ffeee770d45e7eaba', slot: "content" }, index.h("cat-date-inline", { key: '853b3adee0ea8f9c9b2a1276a10fcaa299044b42', ref: el => (this.dateInline = el), min: this.min, max: this.max, value: this.value, noClear: true, onCatChange: this.onDateChange.bind(this) }))))));
1558
+ }
1559
+ getTriggerA11yLabel() {
1560
+ const date = this.locale.fromLocalISO(this.value);
1561
+ return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;
1562
+ }
1563
+ onInputBlur(e) {
1564
+ if (!this.input) {
1565
+ return;
1566
+ }
1567
+ const oldValue = this.value;
1568
+ const dateParsed = this.parse(this.input.value ?? '');
1569
+ const dateMin = this.locale.fromLocalISO(this.min);
1570
+ const dateMax = this.locale.fromLocalISO(this.max);
1571
+ const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;
1572
+ this.value = date ? this.locale.toLocalISO(date) : undefined;
1573
+ if (oldValue !== this.value) {
1574
+ if (date) {
1575
+ this.dateInline?.select(date);
1576
+ }
1577
+ else {
1578
+ this.dateInline?.clear();
1579
+ }
1580
+ this.catChange.emit(this.value);
1581
+ }
1582
+ this.input.value = this.inputValue;
1583
+ this.catBlur.emit(e);
1584
+ }
1585
+ onDateChange(e) {
1586
+ e.stopPropagation();
1587
+ const oldValue = this.value;
1588
+ const date = e.detail ? new Date(e.detail) : null;
1589
+ this.value = date ? this.locale.toLocalISO(date) : undefined;
1590
+ if (oldValue !== this.value) {
1591
+ this.catChange.emit(this.value);
1592
+ }
1593
+ }
1594
+ parse(value) {
1595
+ const [, p1, d1, p2, p3] = /(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr) || [];
1596
+ const formatParts = [p1, p2, p3];
1597
+ const parts = value.split(d1).map(s => Number(s || 'x'));
1598
+ let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();
1599
+ const month = parts[formatParts.indexOf('MM')];
1600
+ const day = parts[formatParts.indexOf('DD')];
1601
+ if (!Number.isInteger(month) || !Number.isInteger(day)) {
1602
+ return null;
1603
+ }
1604
+ else if (year < 100) {
1605
+ year += year < 50 ? 2000 : 1900;
1606
+ }
1607
+ return new Date(year, month - 1, day);
1608
+ }
1609
+ reclamp(mode, limit) {
1610
+ const oldValue = this.value;
1611
+ const oldDate = this.locale.fromLocalISO(oldValue);
1612
+ const limitDate = this.locale.fromLocalISO(limit);
1613
+ if (!oldDate || !limitDate) {
1614
+ return;
1615
+ }
1616
+ const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);
1617
+ const newValue = this.locale.toLocalISO(newDate);
1618
+ if (oldValue !== newValue) {
1619
+ this.value = newValue;
1620
+ this.catChange.emit(newValue);
1621
+ }
1622
+ }
1623
+ get hostElement() { return index.getElement(this); }
1624
+ static get watchers() { return {
1625
+ "min": ["onMinChanged"],
1626
+ "max": ["onMaxChanged"]
1627
+ }; }
1628
+ };
1629
+ CatDate.style = CatDateStyle0;
1630
+
1631
+ const catDateInlineCss = ":host{display:inline-block}:host([hidden]){display:none}.picker{display:flex;flex-direction:column;min-width:19.5rem;max-width:30rem}.picker.picker-weeks{min-width:17.5rem;max-width:28rem}.picker.picker-small{min-width:16rem;max-width:23rem}.picker.picker-small.picker-weeks{min-width:14rem;max-width:21rem}.picker-head{display:flex;gap:0.5rem;align-items:center}.picker-head h3{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:\"pnum\";flex:1;text-align:center;margin:0}.picker-small .picker-head{gap:0.25rem}.picker-small .picker-head h3{font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:\"pnum\"}.picker-grid{display:grid;grid-template-rows:2rem repeat(6, 1fr);grid-template-columns:repeat(7, 1fr);grid-template-areas:\"h h h h h h h\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\";margin:1rem 0 0.5rem}.picker-weeks .picker-grid{grid-template-columns:2rem repeat(7, 1fr);grid-template-areas:\". h h h h h h h\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\";}.picker-small .picker-grid{margin:0.5rem 0}.picker-grid-head{grid-area:h;display:grid;grid-template-columns:repeat(7, 1fr);place-items:end center;padding-bottom:0.5rem}.picker-grid-weeks{grid-area:w;display:grid;grid-template-rows:repeat(6, 1fr);place-items:center right;padding-right:0.5rem}.picker-grid-days{grid-area:d;display:grid;grid-template-rows:repeat(6, 1fr);grid-template-columns:repeat(7, 1fr)}.picker-grid-head>*,.picker-grid-weeks>*{font-size:0.75rem;line-height:1rem;font-weight:600;color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;text-decoration:none}.date-other{opacity:0.5}.date-disabled{opacity:0.25}.picker-foot{display:flex;gap:1rem;align-items:center;width:min-content;min-width:100%;justify-content:space-between}.picker-small .picker-foot{gap:0.5rem}.cursor-help{margin:0;font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;text-align:center;flex:1}.cursor-help:first-child{text-align:left}.cursor-help:last-child{text-align:right}.cursor-help:only-child{text-align:center}.picker-small .cursor-help{font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400)}.cursor-aria{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}.date-range{--cat-border-radius-m:0}";
1632
+ const CatDateInlineStyle0 = catDateInlineCss;
1633
+
1634
+ const CatDateInline = class {
1635
+ constructor(hostRef) {
1636
+ index.registerInstance(this, hostRef);
1637
+ this.catChange = index.createEvent(this, "catChange", 7);
1638
+ this.language = of.catI18nRegistry.getLocale();
1639
+ this.locale = getLocale$2(this.language);
1640
+ // additonally store the focus date to ensure correct focus after potential re-render
1641
+ this.focusDate = null;
1642
+ this.viewDate = this.locale.now();
1643
+ this.noClear = false;
1644
+ this.noHint = false;
1645
+ this.noToday = false;
1646
+ this.noWeeks = false;
1647
+ this.size = 'm';
1648
+ this.min = undefined;
1649
+ this.max = undefined;
1650
+ this.range = false;
1651
+ this.value = undefined;
1652
+ }
1653
+ get focusedDate() {
1654
+ const [all, year, month, day] = this.hostElement.shadowRoot
1655
+ ?.querySelector(`[data-date]:focus`)
1656
+ ?.dataset.date?.match(/^(\d{4})-(\d{2})-(\d{2})/) ?? [];
1657
+ return all ? new Date(Number(year), Number(month) - 1, Number(day)) : null;
1658
+ }
1659
+ componentWillLoad() {
1660
+ // select the initial value
1661
+ const [startDate, endDate] = this.getValue();
1662
+ this.select(startDate);
1663
+ if (this.range && endDate) {
1664
+ this.select(endDate);
1665
+ }
1666
+ }
1514
1667
  componentDidRender() {
1515
1668
  if (this.focusDate) {
1669
+ // re-focus the previously focused date after re-render
1516
1670
  this.hostElement.shadowRoot
1517
- ?.querySelector(`[data-date="${this.toLocalISO(this.focusDate)}"]`)
1671
+ ?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)
1518
1672
  ?.doFocus();
1519
1673
  this.focusDate = null;
1520
1674
  }
1521
1675
  }
1522
- onOpen() {
1523
- this.isOpen = true;
1524
- this.setAriaLive('');
1525
- const viewDate = this.selectionDate
1526
- ? new Date(this.selectionDate.getFullYear(), this.selectionDate.getMonth(), 1)
1527
- : this.now;
1528
- this.viewDate = clampDate(this.minDate, viewDate, this.maxDate);
1529
- }
1530
- onClose() {
1531
- this.isOpen = false;
1532
- }
1533
1676
  onKeyDown(e) {
1534
- if (!this.isOpen || !['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(e.key)) {
1677
+ if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(e.key)) {
1535
1678
  return;
1536
1679
  }
1537
- const focused = this.focusedDate;
1538
- if (!focused) {
1680
+ const focusedDate = this.focusedDate;
1681
+ if (!focusedDate) {
1539
1682
  e.preventDefault();
1540
- this.focus(this.selectionDate || this.now);
1683
+ const [startDate] = this.getValue();
1684
+ this.focus(startDate || this.locale.now());
1541
1685
  }
1542
1686
  else if (e.key === 'ArrowLeft') {
1543
1687
  e.preventDefault();
1544
- this.focus(e.shiftKey ? addMonth(focused, -1) : addDays(focused, -1));
1688
+ this.focus(e.shiftKey ? addMonth(focusedDate, -1) : addDays(focusedDate, -1));
1545
1689
  }
1546
1690
  else if (e.key === 'ArrowRight') {
1547
1691
  e.preventDefault();
1548
- this.focus(e.shiftKey ? addMonth(focused, 1) : addDays(focused, 1));
1692
+ this.focus(e.shiftKey ? addMonth(focusedDate, 1) : addDays(focusedDate, 1));
1549
1693
  }
1550
1694
  else if (e.key === 'ArrowUp') {
1551
1695
  e.preventDefault();
1552
- this.focus(addDays(focused, -7));
1696
+ this.focus(addDays(focusedDate, -7));
1553
1697
  }
1554
1698
  else if (e.key === 'ArrowDown') {
1555
1699
  e.preventDefault();
1556
- this.focus(addDays(focused, 7));
1700
+ this.focus(addDays(focusedDate, 7));
1557
1701
  }
1558
1702
  }
1559
1703
  /**
@@ -1562,76 +1706,76 @@ const CatDate = class {
1562
1706
  * @param date The date to select.
1563
1707
  */
1564
1708
  async select(date) {
1709
+ if (!date) {
1710
+ return this.clear();
1711
+ }
1565
1712
  const oldValue = this.value;
1566
- const newDate = clampDate(this.minDate, new Date(date.getFullYear(), date.getMonth(), date.getDate()), this.maxDate);
1713
+ const [minDate, maxDate] = this.getMinMaxDate();
1714
+ const newDate = clampDate(minDate, new Date(date.getFullYear(), date.getMonth(), date.getDate()), maxDate);
1567
1715
  this.focus(newDate);
1568
- this.selectionDate = newDate;
1569
- this.value = newDate.toISOString();
1716
+ if (this.range) {
1717
+ const [startDate, endDate] = this.getValue();
1718
+ if (!startDate || endDate || newDate < startDate) {
1719
+ this.value = this.toRangeValue(newDate, null);
1720
+ }
1721
+ else {
1722
+ this.value = this.toRangeValue(startDate, newDate);
1723
+ }
1724
+ }
1725
+ else {
1726
+ this.value = this.locale.toLocalISO(newDate);
1727
+ }
1570
1728
  if (oldValue !== this.value) {
1571
1729
  this.catChange.emit(this.value);
1572
1730
  }
1573
1731
  }
1574
1732
  /**
1575
- * Programmatically move focus to the input. Use this method instead of
1576
- * `input.focus()`.
1577
- *
1578
- * @param options An optional object providing options to control aspects of
1579
- * the focusing process.
1580
- */
1581
- async doFocus(options) {
1582
- this.input?.doFocus(options);
1583
- }
1584
- /**
1585
- * Programmatically remove focus from the input. Use this method instead of
1586
- * `input.blur()`.
1733
+ * Clear the picker.
1587
1734
  */
1588
- async doBlur() {
1589
- this.input?.doBlur();
1735
+ async clear() {
1736
+ const oldValue = this.value;
1737
+ this.value = undefined;
1738
+ if (oldValue !== this.value) {
1739
+ this.catChange.emit(this.value);
1740
+ }
1590
1741
  }
1591
1742
  /**
1592
- * Clear the input.
1743
+ * Resets the view of the picker.
1593
1744
  */
1594
- async clear() {
1595
- this.input?.clear();
1745
+ async resetView() {
1746
+ const [minDate, maxDate] = this.getMinMaxDate();
1747
+ const [dateStart] = this.getValue();
1748
+ this.viewDate = dateStart ?? clampDate(minDate, this.locale.now(), maxDate);
1596
1749
  }
1597
1750
  render() {
1751
+ const [minDate, maxDate] = this.getMinMaxDate();
1598
1752
  const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());
1599
- return (index.h(index.Host, { key: 'ebb5f193ca43bc3306449c91d2e391cb25b3287c' }, index.h("cat-input", { key: '27292844d077a8d79022074a191c47e72736d2c5', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, value: this.getInputValue(), onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, index.h("span", { key: 'e9c9ad5b5374fcf944396a7ae45ae61775336be4', slot: "label" }, this.label, index.h("span", { key: '5a05917857fdc967bb122e0403f64b8b71ecf08a', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: 'ac1b7f5e1efae2648fa82acb31059ab41d0adb55', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true }, index.h("cat-button", { key: 'bfaabd6f8120333b497b262894489628beb1d886', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.selectionDate
1600
- ? `${this.locale.change}, ${this.getA11yLabelDay(this.selectionDate)}`
1601
- : this.locale.choose }), index.h("div", { key: '9cfb02ca034584dcdd23fadb5f41ca598552a605', class: "picker", slot: "content" }, index.h("div", { key: '4d09c5f3ca84346bbcc68f4c83f3413159b8b608', class: "picker-head" }, index.h("cat-button", { key: '9e8d1695f1a882f2388a2b57ccd8cc51e8b52483', icon: "$cat:datepicker-year-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevYear, disabled: isSameYear(this.viewDate, this.minDate), onClick: () => this.navigate('prev', 'year'), "data-dropdown-no-close": true }), index.h("cat-button", { key: '5af1b092c2f0d13e5c12d49699e85ea5dded7580', icon: "$cat:datepicker-month-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevMonth, disabled: isSameMonth(this.viewDate, this.minDate), onClick: () => this.navigate('prev', 'month'), "data-dropdown-no-close": true }), index.h("h3", { key: 'cd730386e0fc19a4b12ee2910e6de7f079133584' }, this.getHeadline()), index.h("cat-button", { key: 'f0c76ac04573977e255956d2e377dd197080a5b8', icon: "$cat:datepicker-month-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextMonth, disabled: isSameMonth(this.viewDate, this.maxDate), onClick: () => this.navigate('next', 'month'), "data-dropdown-no-close": true }), index.h("cat-button", { key: 'd58917e0665df029acc6dac35e7ab05eab60f9d4', icon: "$cat:datepicker-year-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextYear, disabled: isSameYear(this.viewDate, this.maxDate), onClick: () => this.navigate('next', 'year'), "data-dropdown-no-close": true })), index.h("div", { key: '5307170ba72c90fceef4276aa5feb74dc569c74d', class: "picker-grid", onFocusin: () => this.setAriaLive(this.locale.arrowKeys) }, index.h("div", { key: 'acd6b0e720722ed3e3d013463645fe294a75b68d', class: "picker-grid-head" }, Array.from(Array(7), (_, i) => (index.h("abbr", { title: this.locale.days.long[i] }, this.locale.days.short[i])))), index.h("div", { key: 'a8b349d48f3595b7a29a037fb48b130dfb9af438', class: "picker-grid-weeks" }, dateGrid
1753
+ const [dateStart, dateEnd] = this.getValue();
1754
+ return (index.h(index.Host, { key: '2b21e43ebc9a69988b475f2eae1eb2f2aeee97cb' }, index.h("div", { key: '3f256483614d09440bee07be4e8996bc1c187d2b', class: { picker: true, 'picker-small': this.size === 's', 'picker-weeks': !this.noWeeks } }, index.h("div", { key: 'c9d82a518d78439164e99240fa13afabcc81e267', class: "picker-head" }, index.h("cat-button", { key: 'bcc803acb0ac2d7947fa53615ca105d77063e9f9', icon: "$cat:datepicker-year-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevYear, disabled: isSameYear(this.viewDate, minDate), onClick: () => this.navigate('prev', 'year'), "data-dropdown-no-close": true }), index.h("cat-button", { key: '3626bbe3e1a79c08d7a6257cb78ce398ceb1b750', icon: "$cat:datepicker-month-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevMonth, disabled: isSameMonth(this.viewDate, minDate), onClick: () => this.navigate('prev', 'month'), "data-dropdown-no-close": true }), index.h("h3", { key: '92462a6702792afd573c91f0c12e2bae599378ae' }, this.getHeadline()), index.h("cat-button", { key: '4ce63e1451b820098feea0ff2f45d9b7d0b5cc28', icon: "$cat:datepicker-month-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextMonth, disabled: isSameMonth(this.viewDate, maxDate), onClick: () => this.navigate('next', 'month'), "data-dropdown-no-close": true }), index.h("cat-button", { key: '97adedac70ce8f19ba0725ca6a1bb836a1d8c0c3', icon: "$cat:datepicker-year-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextYear, disabled: isSameYear(this.viewDate, maxDate), onClick: () => this.navigate('next', 'year'), "data-dropdown-no-close": true })), index.h("div", { key: '9bbc58c07f911e928cd231a784604abada3698ea', class: "picker-grid", onFocusin: () => this.setAriaLive(this.locale.arrowKeys) }, index.h("div", { key: '2eff946487bfdbce49521b513d6065bd42c78ac0', class: "picker-grid-head" }, Array.from(Array(7), (_, i) => (index.h("abbr", { title: this.locale.days.long[i] }, this.locale.days.short[i])))), !this.noWeeks && (index.h("div", { class: "picker-grid-weeks" }, dateGrid
1602
1755
  .filter((_, i) => i % 7 === 0)
1603
- .map(day => (index.h("div", null, this.getWeekNumber(day))))), index.h("div", { key: '1e7750157710763ad977d866bb2e511b6ec44d03', class: "picker-grid-days" }, dateGrid.map(day => (index.h("cat-button", { class: {
1604
- 'cat-date-item': true,
1605
- 'date-other': !isSameMonth(this.viewDate, day),
1606
- 'date-today': isSameDay(this.now, day),
1607
- 'date-selected': isSameDay(this.selectionDate, day),
1608
- 'date-focusable': this.canFocus(day),
1609
- 'date-disabled': !this.canClick(day)
1610
- }, nativeAttributes: !this.canFocus(day) ? { tabindex: '-1' } : {}, variant: isSameDay(this.selectionDate, day) ? 'filled' : isSameDay(this.now, day) ? 'outlined' : 'text', a11yLabel: this.getA11yLabelDay(day), active: isSameDay(this.selectionDate, day), color: isSameDay(this.selectionDate, day) || isSameDay(this.now, day) ? 'primary' : 'secondary', disabled: !this.canClick(day), onClick: () => this.select(day), "data-date": this.toLocalISO(day) }, day.getDate()))))), index.h("div", { key: 'd8874097357312b5ddd4bda5e4018d3e642aaf99', class: "picker-foot" }, this.canClick(this.now) && (index.h("cat-button", { size: "s", "data-dropdown-no-close": true, onClick: () => this.select(this.now) }, this.locale.today)), index.h("p", { key: '42d936d44ef0cb07375415ae42a95565cd7f342b', class: {
1611
- 'cursor-help': true,
1612
- 'cursor-right': this.canClick(this.now)
1613
- } }, this.locale.arrowKeys), index.h("p", { key: '6df5566486d5082b3c2cb79fde22cedd7608c8bf', class: "cursor-aria", "aria-live": "polite" })))))));
1614
- }
1615
- parse(value) {
1616
- const [, p1, d1, p2, p3] = /(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr) || [];
1617
- const formatParts = [p1, p2, p3];
1618
- const parts = value.split(d1).map(s => Number(s || 'x'));
1619
- let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.now.getFullYear();
1620
- const month = parts[formatParts.indexOf('MM')];
1621
- const day = parts[formatParts.indexOf('DD')];
1622
- if (!Number.isInteger(month) || !Number.isInteger(day)) {
1623
- return null;
1624
- }
1625
- else if (year < 100) {
1626
- year += year < 50 ? 2000 : 1900;
1627
- }
1628
- return new Date(year, month - 1, day);
1756
+ .map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '48f7b239e8ccb0d56b4f7c80d8892b79c2908990', class: "picker-grid-days" }, dateGrid.map(day => {
1757
+ const isStartDate = isSameDay(dateStart, day);
1758
+ const isEndDate = isSameDay(dateEnd, day);
1759
+ const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;
1760
+ const isToday = isSameDay(this.locale.now(), day);
1761
+ return (index.h("cat-button", { class: {
1762
+ 'cat-date-item': true,
1763
+ 'date-other': !isSameMonth(this.viewDate, day),
1764
+ 'date-today': isToday,
1765
+ 'date-start': this.range && isStartDate,
1766
+ 'date-range': this.range && isRange,
1767
+ 'date-end': this.range && isEndDate,
1768
+ 'date-focusable': this.canFocus(day),
1769
+ 'date-disabled': !this.canClick(day)
1770
+ }, size: this.size, nativeAttributes: !this.canFocus(day) ? { tabindex: '-1' } : {}, variant: isStartDate || isEndDate ? 'filled' : isToday ? 'outlined' : 'text', a11yLabel: this.locale.toLocalStr(day), active: isStartDate || isEndDate || isRange, color: isStartDate || isEndDate || isToday ? 'primary' : 'secondary', disabled: !this.canClick(day), onClick: () => this.select(day), "data-date": this.locale.toLocalISO(day) }, day.getDate()));
1771
+ }))), index.h("div", { key: 'e6c30b78568d92d3a17936fdff4c7fec1ac4965f', class: "picker-foot" }, !this.noToday && this.canClick(this.locale.now()) && (index.h("cat-button", { size: "s", "data-dropdown-no-close": true, onClick: () => this.select(this.locale.now()) }, this.locale.today)), !this.noHint && index.h("p", { class: "cursor-help" }, this.locale.arrowKeys), !this.noClear && (index.h("cat-button", { size: "s", disabled: !this.value, "data-dropdown-no-close": true, onClick: () => this.clear() }, this.locale.clear)))), index.h("p", { key: 'e31cabf38ed3545ddd4acc32c2540eb5706bc17c', class: "cursor-aria", "aria-live": "polite" })));
1629
1772
  }
1630
1773
  focus(date) {
1631
- this.focusDate = clampDate(this.minDate, date, this.maxDate);
1774
+ const [minDate, maxDate] = this.getMinMaxDate();
1775
+ this.focusDate = clampDate(minDate, date, maxDate);
1632
1776
  this.viewDate = new Date(this.focusDate.getFullYear(), this.focusDate.getMonth());
1633
1777
  this.hostElement.shadowRoot
1634
- ?.querySelector(`[data-date="${this.toLocalISO(this.focusDate)}"]`)
1778
+ ?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)
1635
1779
  ?.doFocus();
1636
1780
  }
1637
1781
  navigate(direction, period) {
@@ -1651,20 +1795,6 @@ const CatDate = class {
1651
1795
  node.innerHTML = text;
1652
1796
  }
1653
1797
  }
1654
- onInputBlur(e) {
1655
- if (!this.input) {
1656
- return;
1657
- }
1658
- const oldValue = this.value;
1659
- const value = this.parse(this.input.value ?? '');
1660
- this.selectionDate = value ? clampDate(this.minDate, value, this.maxDate) : value;
1661
- this.value = this.selectionDate?.toISOString();
1662
- if (oldValue !== this.value) {
1663
- this.catChange.emit(this.value);
1664
- }
1665
- this.input.value = this.getInputValue();
1666
- this.catBlur.emit(e);
1667
- }
1668
1798
  dateGrid(year, month) {
1669
1799
  const firstDayOfWeek = new Date(year, month, 1).getDay();
1670
1800
  const daysInMonth = new Date(year, month + 1, 0).getDate();
@@ -1680,19 +1810,6 @@ const CatDate = class {
1680
1810
  getHeadline() {
1681
1811
  return `${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`;
1682
1812
  }
1683
- getInputValue() {
1684
- const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });
1685
- return this.selectionDate ? format.format(this.selectionDate) : '';
1686
- }
1687
- getA11yLabelDay(date) {
1688
- const format = new Intl.DateTimeFormat(this.language, {
1689
- year: 'numeric',
1690
- month: 'long',
1691
- day: 'numeric',
1692
- weekday: 'long'
1693
- });
1694
- return format.format(date);
1695
- }
1696
1813
  getWeekNumber(date, iso8601 = true) {
1697
1814
  const currentDate = new Date(date.getTime());
1698
1815
  const dayNum = iso8601 ? currentDate.getDay() || 7 : currentDate.getDay();
@@ -1701,34 +1818,46 @@ const CatDate = class {
1701
1818
  return Math.ceil(((+currentDate - +yearStart) / 86400000 + 1) / 7);
1702
1819
  }
1703
1820
  canFocus(date) {
1704
- const now = this.now;
1705
- const focused = this.focusedDate;
1706
- if (focused && isSameMonth(focused, this.viewDate)) {
1707
- return isSameMonth(focused, date) && isSameDay(focused, date);
1821
+ const now = this.locale.now();
1822
+ const [minDate] = this.getMinMaxDate();
1823
+ const focusedDate = this.focusedDate;
1824
+ const [startDate] = this.getValue();
1825
+ if (focusedDate && isSameMonth(focusedDate, this.viewDate)) {
1826
+ return isSameMonth(focusedDate, date) && isSameDay(focusedDate, date);
1708
1827
  }
1709
- else if (this.selectionDate && isSameMonth(this.selectionDate, this.viewDate)) {
1710
- return isSameMonth(this.selectionDate, date) && isSameDay(this.selectionDate, date);
1828
+ else if (startDate && isSameMonth(startDate, this.viewDate)) {
1829
+ return isSameMonth(startDate, date) && isSameDay(startDate, date);
1711
1830
  }
1712
- else if (isSameMonth(this.viewDate, now) && (!this.minDate || this.minDate <= now)) {
1831
+ else if (isSameMonth(this.viewDate, now) && (!minDate || minDate <= now)) {
1713
1832
  return isSameMonth(this.viewDate, date) && isSameDay(now, date);
1714
1833
  }
1715
- const minDay = isSameMonth(date, this.minDate) ? this.minDate?.getDate() ?? 1 : 1;
1834
+ const minDay = isSameMonth(date, minDate) ? minDate?.getDate() ?? 1 : 1;
1716
1835
  return isSameMonth(this.viewDate, date) && date.getDate() === minDay;
1717
1836
  }
1718
1837
  canClick(date) {
1719
- const min = this.minDate;
1720
- const max = this.maxDate;
1721
- return (!min || min <= date) && (!max || max >= date);
1838
+ const [minDate, maxDate] = this.getMinMaxDate();
1839
+ return (!minDate || minDate <= date) && (!maxDate || maxDate >= date);
1840
+ }
1841
+ getMinMaxDate() {
1842
+ const minDate = this.locale.fromLocalISO(this.min);
1843
+ const maxDate = this.locale.fromLocalISO(this.max);
1844
+ return [minDate, maxDate];
1845
+ }
1846
+ getValue() {
1847
+ if (this.range) {
1848
+ const [startDate, endDate] = JSON.parse(this.value || '[]');
1849
+ return [this.locale.fromLocalISO(startDate), this.locale.fromLocalISO(endDate)];
1850
+ }
1851
+ else {
1852
+ return [this.locale.fromLocalISO(this.value), null];
1853
+ }
1722
1854
  }
1723
- toLocalISO(date) {
1724
- const year = date.getFullYear();
1725
- const month = (date.getMonth() + 1).toString().padStart(2, '0');
1726
- const day = date.getDate().toString().padStart(2, '0');
1727
- return `${year}-${month}-${day}`;
1855
+ toRangeValue(startDate, endDate) {
1856
+ return JSON.stringify([startDate, endDate].map(date => (date ? this.locale.toLocalISO(date) : null)));
1728
1857
  }
1729
1858
  get hostElement() { return index.getElement(this); }
1730
1859
  };
1731
- CatDate.style = CatDateStyle0;
1860
+ CatDateInline.style = CatDateInlineStyle0;
1732
1861
 
1733
1862
  var HOOKS = [
1734
1863
  "onChange",
@@ -4541,8 +4670,18 @@ function getLocale$1(language) {
4541
4670
  };
4542
4671
  }
4543
4672
 
4544
- const min$1 = Math.min;
4545
- const max$1 = Math.max;
4673
+ /**
4674
+ * Custom positioning reference element.
4675
+ * @see https://floating-ui.com/docs/virtual-elements
4676
+ */
4677
+ const min = Math.min;
4678
+ const max = Math.max;
4679
+ const round = Math.round;
4680
+ const floor = Math.floor;
4681
+ const createCoords = v => ({
4682
+ x: v,
4683
+ y: v
4684
+ });
4546
4685
  const oppositeSideMap = {
4547
4686
  left: 'right',
4548
4687
  right: 'left',
@@ -4554,7 +4693,7 @@ const oppositeAlignmentMap = {
4554
4693
  end: 'start'
4555
4694
  };
4556
4695
  function clamp(start, value, end) {
4557
- return max$1(start, min$1(value, end));
4696
+ return max(start, min(value, end));
4558
4697
  }
4559
4698
  function evaluate(value, param) {
4560
4699
  return typeof value === 'function' ? value(param) : value;
@@ -4713,7 +4852,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
4713
4852
 
4714
4853
  /**
4715
4854
  * Computes the `x` and `y` coordinates that will place the floating element
4716
- * next to a reference element when it is given a certain positioning strategy.
4855
+ * next to a given reference element.
4717
4856
  *
4718
4857
  * This export does not have any `platform` interface logic. You will need to
4719
4858
  * write one for the platform you are using Floating UI with.
@@ -4791,7 +4930,6 @@ const computePosition$1 = async (reference, floating, config) => {
4791
4930
  } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
4792
4931
  }
4793
4932
  i = -1;
4794
- continue;
4795
4933
  }
4796
4934
  }
4797
4935
  return {
@@ -4854,6 +4992,7 @@ async function detectOverflow(state, options) {
4854
4992
  y: 1
4855
4993
  };
4856
4994
  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
4995
+ elements,
4857
4996
  rect,
4858
4997
  offsetParent,
4859
4998
  strategy
@@ -4983,6 +5122,7 @@ const flip$1 = function (options) {
4983
5122
 
4984
5123
  // For type backwards-compatibility, the `OffsetOptions` type was also
4985
5124
  // Derivable.
5125
+
4986
5126
  async function convertValueToCoords(state, options) {
4987
5127
  const {
4988
5128
  placement,
@@ -4996,8 +5136,6 @@ async function convertValueToCoords(state, options) {
4996
5136
  const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
4997
5137
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
4998
5138
  const rawValue = evaluate(options, state);
4999
-
5000
- // eslint-disable-next-line prefer-const
5001
5139
  let {
5002
5140
  mainAxis,
5003
5141
  crossAxis,
@@ -5039,15 +5177,27 @@ const offset = function (options) {
5039
5177
  name: 'offset',
5040
5178
  options,
5041
5179
  async fn(state) {
5180
+ var _middlewareData$offse, _middlewareData$arrow;
5042
5181
  const {
5043
5182
  x,
5044
- y
5183
+ y,
5184
+ placement,
5185
+ middlewareData
5045
5186
  } = state;
5046
5187
  const diffCoords = await convertValueToCoords(state, options);
5188
+
5189
+ // If the placement is the same and the arrow caused an alignment offset
5190
+ // then we don't need to change the positioning coordinates.
5191
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
5192
+ return {};
5193
+ }
5047
5194
  return {
5048
5195
  x: x + diffCoords.x,
5049
5196
  y: y + diffCoords.y,
5050
- data: diffCoords
5197
+ data: {
5198
+ ...diffCoords,
5199
+ placement
5200
+ }
5051
5201
  };
5052
5202
  }
5053
5203
  };
@@ -5175,20 +5325,20 @@ const size$1 = function (options) {
5175
5325
  let availableWidth = overflowAvailableWidth;
5176
5326
  if (isYAxis) {
5177
5327
  const maximumClippingWidth = width - overflow.left - overflow.right;
5178
- availableWidth = alignment || noShift ? min$1(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
5328
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
5179
5329
  } else {
5180
5330
  const maximumClippingHeight = height - overflow.top - overflow.bottom;
5181
- availableHeight = alignment || noShift ? min$1(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
5331
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
5182
5332
  }
5183
5333
  if (noShift && !alignment) {
5184
- const xMin = max$1(overflow.left, 0);
5185
- const xMax = max$1(overflow.right, 0);
5186
- const yMin = max$1(overflow.top, 0);
5187
- const yMax = max$1(overflow.bottom, 0);
5334
+ const xMin = max(overflow.left, 0);
5335
+ const xMax = max(overflow.right, 0);
5336
+ const yMin = max(overflow.top, 0);
5337
+ const yMax = max(overflow.bottom, 0);
5188
5338
  if (isYAxis) {
5189
- availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$1(overflow.left, overflow.right));
5339
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
5190
5340
  } else {
5191
- availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$1(overflow.top, overflow.bottom));
5341
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
5192
5342
  }
5193
5343
  }
5194
5344
  await apply({
@@ -5209,19 +5359,6 @@ const size$1 = function (options) {
5209
5359
  };
5210
5360
  };
5211
5361
 
5212
- /**
5213
- * Custom positioning reference element.
5214
- * @see https://floating-ui.com/docs/virtual-elements
5215
- */
5216
- const min = Math.min;
5217
- const max = Math.max;
5218
- const round = Math.round;
5219
- const floor = Math.floor;
5220
- const createCoords = v => ({
5221
- x: v,
5222
- y: v
5223
- });
5224
-
5225
5362
  function getNodeName(node) {
5226
5363
  if (isNode(node)) {
5227
5364
  return (node.nodeName || '').toLowerCase();
@@ -6088,7 +6225,7 @@ const CatDatepickerFlat = class {
6088
6225
  }
6089
6226
  render() {
6090
6227
  return [
6091
- index.h("cat-input", { key: '30fb619a94e93a583bf7df28945917562c6b184f', ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
6228
+ index.h("cat-input", { key: 'bb983974c17139ee60d88877e398b1c46d672d37', ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
6092
6229
  e.stopPropagation();
6093
6230
  this.value = e.detail || undefined;
6094
6231
  }, onCatFocus: e => {
@@ -6098,7 +6235,7 @@ const CatDatepickerFlat = class {
6098
6235
  e.stopPropagation();
6099
6236
  this.catBlur.emit(e.detail);
6100
6237
  } }, this.hasSlottedLabel && (index.h("span", { slot: "label" }, index.h("slot", { name: "label" }))), this.hasSlottedHint && (index.h("span", { slot: "hint" }, index.h("slot", { name: "hint" })))),
6101
- index.h("div", { key: 'f28f001436363260ec7c9dff26a8f82475c98ac5', ref: el => (this._calendarWrapper = el), class: "datepicker-wrapper" })
6238
+ index.h("div", { key: 'c8112214544e0582a1196350a846ddeb063067a3', ref: el => (this._calendarWrapper = el), class: "datepicker-wrapper" })
6102
6239
  ];
6103
6240
  }
6104
6241
  initDatepicker(input) {
@@ -6201,11 +6338,11 @@ const CatDatepickerInline = class {
6201
6338
  this.pickr = this.initDatepicker(this.input);
6202
6339
  }
6203
6340
  render() {
6204
- return (index.h(index.Host, { key: 'bb9ebb60420d1268751f6136e38d1aed5bc74602' }, index.h("div", { key: 'b84cc674ab3b677ceb646dee84b1b83d5d969746', tabIndex: this.disabled || this.readonly ? -1 : undefined, class: {
6341
+ return (index.h(index.Host, { key: '6f363a4a673603f0c39f5a24b31bb768e804abfc' }, index.h("div", { key: '2c56934aad4d60ea96a6a3c983ae9d1e39c82bde', tabIndex: this.disabled || this.readonly ? -1 : undefined, class: {
6205
6342
  'datepicker-wrapper': true,
6206
6343
  'datepicker-disabled': this.disabled,
6207
6344
  'datepicker-readonly': this.readonly
6208
- } }, index.h("input", { key: '6f7706220aa7465a907391e78f97a5e1ad91fdf0', ref: el => (this.input = el), value: this.value, disabled: this.disabled, readonly: this.readonly }))));
6345
+ } }, index.h("input", { key: '6885c1c919af468401dddda38045ab9a8dc26aaf', ref: el => (this.input = el), value: this.value, disabled: this.disabled, readonly: this.readonly }))));
6209
6346
  }
6210
6347
  initDatepicker(input) {
6211
6348
  if (!input) {
@@ -7764,6 +7901,7 @@ const CatDropdown = class {
7764
7901
  this.arrowNavigation = 'vertical';
7765
7902
  this.noResize = false;
7766
7903
  this.overflow = false;
7904
+ this.noInitialFocus = false;
7767
7905
  }
7768
7906
  clickHandler(event) {
7769
7907
  // we need to delay the initialization of the trigger until first
@@ -7795,6 +7933,9 @@ const CatDropdown = class {
7795
7933
  * Opens the dropdown.
7796
7934
  */
7797
7935
  async open() {
7936
+ if (!this.trigger) {
7937
+ this.initTrigger();
7938
+ }
7798
7939
  if (this.isOpen === null || this.isOpen) {
7799
7940
  return; // busy or open
7800
7941
  }
@@ -7835,7 +7976,8 @@ const CatDropdown = class {
7835
7976
  return true;
7836
7977
  }
7837
7978
  return event.key === 'Tab' && event.shiftKey;
7838
- }
7979
+ },
7980
+ initialFocus: () => (this.noInitialFocus ? false : undefined)
7839
7981
  });
7840
7982
  this.trap.activate();
7841
7983
  });
@@ -7860,7 +8002,7 @@ const CatDropdown = class {
7860
8002
  }, timeTransitionS);
7861
8003
  }
7862
8004
  render() {
7863
- return (index.h(index.Host, { key: 'b9a95b9b2c0e084fe0036989f174ee1681ecfe96' }, index.h("slot", { key: '73d2e8b7dd4c67f95c6b9faa34142de00eb25c4e', name: "trigger", ref: el => (this.triggerSlot = el) }), index.h("div", { key: '6555cf3ab1b4f0cfcea0e9ba85221f3de5cede82', id: this.contentId, class: { content: true, 'overflow-auto': !this.overflow }, ref: el => (this.content = el) }, index.h("slot", { key: '70dab119fa43e67e1d17b558519028c0f9da60d4', name: "content" }))));
8005
+ return (index.h(index.Host, { key: '6cde42e7f7bfc2df858b7179157a1f52e0c23e0e' }, index.h("slot", { key: '91633464f448a8142f52b6e1e62420974a929e84', name: "trigger", ref: el => (this.triggerSlot = el) }), index.h("div", { key: '2ed9bd2dcc58b83ec1e7781959456e67d9397c48', id: this.contentId, class: { content: true, 'overflow-auto': !this.overflow }, ref: el => (this.content = el) }, index.h("slot", { key: 'a91710cd8455cb006f60e48dd49aee7f6d114877', name: "content" }))));
7864
8006
  }
7865
8007
  get contentId() {
7866
8008
  return `cat-dropdown-${this.id}`;
@@ -7946,7 +8088,7 @@ const CatFormGroup = class {
7946
8088
  });
7947
8089
  }
7948
8090
  render() {
7949
- return (index.h(index.Host, { key: 'd9805ae9997123327fa6259d9e849dff68576b31', style: { '--label-size': this.labelSize } }, index.h("slot", { key: 'e7e254cf202b8ee8a219ec077e659fde18db3530', onSlotchange: this.onSlotChange.bind(this) })));
8091
+ return (index.h(index.Host, { key: '6892a4f36f418d431b6006518c44bf2b58e70f70', style: { '--label-size': this.labelSize } }, index.h("slot", { key: '908b2720b504ce9dfb3a491aa3bbe092a3d2e0cf', onSlotchange: this.onSlotChange.bind(this) })));
7950
8092
  }
7951
8093
  onSlotChange() {
7952
8094
  this.formElements = Array.from(this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker'));
@@ -7978,7 +8120,7 @@ const CatIcon = class {
7978
8120
  this.a11yLabel = undefined;
7979
8121
  }
7980
8122
  render() {
7981
- return (index.h("span", { key: 'ace2ec39a623d9c8168269a5b4c46c4efef2fbc7', innerHTML: this.iconSrc || (this.icon ? of.catIconRegistry.getIcon(this.icon) : ''), "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', part: "icon", class: {
8123
+ return (index.h("span", { key: '66938702e645f5bc12ca9a4592af24ac46b40c52', innerHTML: this.iconSrc || (this.icon ? of.catIconRegistry.getIcon(this.icon) : ''), "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', part: "icon", class: {
7982
8124
  icon: true,
7983
8125
  [`icon-${this.size}`]: this.size !== 'inline'
7984
8126
  } }));
@@ -9659,19 +9801,19 @@ const CatInput = class {
9659
9801
  }
9660
9802
  }
9661
9803
  render() {
9662
- return (index.h("div", { key: 'aab57f9704562874b2dee392630c473fc31a33cb', class: {
9804
+ return (index.h("div", { key: '34152d1627e62e4852531f9afdb2b0abc3894a78', class: {
9663
9805
  'input-field': true,
9664
9806
  'input-horizontal': this.horizontal
9665
- } }, index.h("div", { key: 'f599b443389362d9eb3ee72d496d225ca2a8bf8d', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, part: "label" }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').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", { key: 'ddce0aaa854e32ae4b8a8686a3886089beac6300', class: "input-container" }, index.h("div", { key: '25eb9aa776ba2cee97fb2bf79bc52d5c44c54b55', class: "input-outer-wrapper" }, index.h("div", { key: '7cd420c3525b8e15a7c0f2d8405cdd70f2e5291c', class: {
9807
+ } }, index.h("div", { key: '89c3e91d9d041a68389e776f38647aa6360e5ea5', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, part: "label" }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').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", { key: 'ceed5e06d5bfb6eaf425c562422a6cb470c3dea4', class: "input-container" }, index.h("div", { key: 'bbd90f6b705d2e9213a45f5f7839370fce830c89', class: "input-outer-wrapper" }, index.h("div", { key: '7fa315fbb8421e0466d7bceba57c9f158d08c476', class: {
9666
9808
  'input-wrapper': true,
9667
9809
  'input-round': this.round,
9668
9810
  'input-readonly': this.readonly,
9669
9811
  'input-disabled': this.disabled,
9670
9812
  'input-invalid': this.invalid
9671
- }, 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", onClick: () => this.doFocus() })), index.h("div", { key: '7f0c24c572ddfb4a1f76457955b28c111c1b444a', class: "input-inner-wrapper" }, index.h("input", { key: 'fcef418a1eb7c5d54f47e239f8db0cf52f23d3f7', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
9813
+ }, 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", onClick: () => this.doFocus() })), index.h("div", { key: 'd8db1f7ab01afe94166fc4f6a6d37a595941c0e5', class: "input-inner-wrapper" }, index.h("input", { key: 'af383fe0a04ca8a41e9d9595ee4f422cebb5d99d', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
9672
9814
  'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
9673
9815
  'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
9674
- }, 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.isPasswordShown ? 'text' : 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.hasHint ? 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.togglePassword && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), 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))), index.h("slot", { key: '3c3ff6368c631ae0634a7d0b875cb0d6a69edcba', name: "addon" })), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
9816
+ }, 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.isPasswordShown ? 'text' : 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.hasHint ? 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.togglePassword && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), 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))), index.h("slot", { key: '5d318f9d6eeeebcef42b5d7abb000f0e51375303', name: "addon" })), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
9675
9817
  }
9676
9818
  get hasHint() {
9677
9819
  return !!this.hint || !!this.hasSlottedHint || this.invalid;
@@ -9749,9 +9891,9 @@ const CatPagination = class {
9749
9891
  this.iconNext = '$cat:pagination-right';
9750
9892
  }
9751
9893
  render() {
9752
- return (index.h("nav", { key: '113d4e757e003c8351efe53f8baeaffe28428c8f', role: "navigation" }, index.h("ol", { key: '15d86b0fd427abdd7f1af9ababb324806a746d05', class: {
9894
+ return (index.h("nav", { key: 'ede4b30a483fb729428b8d2bfdd4d67b1b5f1022', role: "navigation" }, index.h("ol", { key: '04fd80b91e33c55a23d010e5fa108b10a08e2bdb', class: {
9753
9895
  [`cat-pagination-${this.size}`]: Boolean(this.size)
9754
- } }, index.h("li", { key: 'b6e6dad6d903b65850cd33c15327386a61fde3d4' }, index.h("cat-button", { key: 'd32aa4a3af4aaae84b5d2de695deadf0852f4ae0', variant: this.variant, size: this.size, round: this.round, disabled: this.isFirst, a11yLabel: of.catI18nRegistry.t('pagination.prev'), icon: this.iconPrev, iconOnly: true, onClick: () => this.setPage(this.page - 1) })), this.content, index.h("li", { key: '19567f748e4f3976576ea1c894c2524865d6201a' }, index.h("cat-button", { key: '6170034891849aef2e248a1f531d86806aa4f4c1', variant: this.variant, size: this.size, round: this.round, disabled: this.isLast, a11yLabel: of.catI18nRegistry.t('pagination.next'), icon: this.iconNext, iconOnly: true, onClick: () => this.setPage(this.page + 1) })))));
9896
+ } }, index.h("li", { key: 'cd98373b4a9a69b25e9df8185b808561336c9a75' }, index.h("cat-button", { key: 'ec601998cd4ba8a2007e1f1dcecad86f36633095', variant: this.variant, size: this.size, round: this.round, disabled: this.isFirst, a11yLabel: of.catI18nRegistry.t('pagination.prev'), icon: this.iconPrev, iconOnly: true, onClick: () => this.setPage(this.page - 1) })), this.content, index.h("li", { key: '8ff7654e0087ece5cb4f81205083ea8f13af7112' }, index.h("cat-button", { key: '3ca4cf8fa48d650472e20efc09cbed49b55d33bf', variant: this.variant, size: this.size, round: this.round, disabled: this.isLast, a11yLabel: of.catI18nRegistry.t('pagination.next'), icon: this.iconNext, iconOnly: true, onClick: () => this.setPage(this.page + 1) })))));
9755
9897
  }
9756
9898
  get isFirst() {
9757
9899
  return this.page === 0;
@@ -9803,7 +9945,7 @@ const CatPagination = class {
9803
9945
  };
9804
9946
  CatPagination.style = CatPaginationStyle0;
9805
9947
 
9806
- const catRadioCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.5rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle-placeholder{width:calc(1.25rem + 1px);flex-shrink:0}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}";
9948
+ const catRadioCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle-placeholder{width:calc(1.25rem + 1px);flex-shrink:0}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}";
9807
9949
  const CatRadioStyle0 = catRadioCss;
9808
9950
 
9809
9951
  let nextUniqueId$5 = 0;
@@ -9856,7 +9998,7 @@ const CatRadio = class {
9856
9998
  this.input.blur();
9857
9999
  }
9858
10000
  render() {
9859
- return (index.h(index.Host, { key: '9e3d983eeda3b42a67db73775cafcb9a5d98953a' }, index.h("label", { key: 'e2c5919edf0540000622a239b4acaa7704b2b3a8', htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled, 'label-left': this.labelLeft }, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, index.h("span", { key: '1f8d95c1728e910305c6ef827b6779b4642102d8', class: "radio" }, index.h("input", { key: 'd0217cd454023eb440ef4c2481899f30c15c340f', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.identifier || this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), index.h("span", { key: '83a85842c187adf508cba7497d9e2a545163967b', class: "circle" })), index.h("span", { key: 'de6ed4d4a62b894406ec53380ac4949a265fe74b', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label)), this.hasHint && (index.h("div", { class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { class: "circle-placeholder" }), index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
10001
+ return (index.h(index.Host, { key: '1f5432c0800e82741e2786146b728403157eb874' }, index.h("label", { key: 'cac427f0f10635bd03a799d25ac0160b721cfcdb', htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled, 'label-left': this.labelLeft }, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, index.h("span", { key: '6a8598e54d46eb976717faf125c58a675b79ad99', class: "radio" }, index.h("input", { key: '7b5dea2ce070d83a1a1f16375d3d782f8b3d1459', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.identifier || this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), index.h("span", { key: 'e6f1802e164c2b74f84f413fd351ea6a9f10c9a2', class: "circle" })), index.h("span", { key: '95e951a221d6b36d980a6619fa501a409555e981', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label)), this.hasHint && (index.h("div", { class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { class: "circle-placeholder" }), index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
9860
10002
  }
9861
10003
  get hasHint() {
9862
10004
  return !!this.hint || !!this.hasSlottedHint;
@@ -9947,7 +10089,7 @@ const CatRadioGroup = class {
9947
10089
  }
9948
10090
  }
9949
10091
  render() {
9950
- return (index.h("div", { key: '05f0e3dddf696ecc2de0ea7491011e9ce6cf7ce4', role: "radiogroup", "aria-label": this.a11yLabel }, index.h("slot", { key: 'f67dc6e9f7e8410104626a1c5e54587d4cae51b0' })));
10092
+ return (index.h("div", { key: '5608e54b1bb857a4068a6287b072bd71081d51d2', role: "radiogroup", "aria-label": this.a11yLabel }, index.h("slot", { key: '8e62283745589e94e99650f7fe85afeea39fa253' })));
9951
10093
  }
9952
10094
  init() {
9953
10095
  this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));
@@ -10036,13 +10178,13 @@ const CatScrollable = class {
10036
10178
  }
10037
10179
  render() {
10038
10180
  return [
10039
- index.h("div", { key: 'a665d0c5a252ffb60c451b47b19e58d720aa7cc5', class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && index.h("div", { class: "shadow-top" }), !this.noShadowX && index.h("div", { class: "shadow-left" }), !this.noShadowX && index.h("div", { class: "shadow-right" }), !this.noShadowY && index.h("div", { class: "shadow-bottom" })),
10040
- index.h("div", { key: 'b5148d1b4d36da8f58dfd1a9f5ee4f8281e7bf48', ref: el => (this.scrollElement = el), class: {
10181
+ index.h("div", { key: 'b8d4abf49b6747e516f23bc4e16bbc1b7b9e2efe', class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && index.h("div", { class: "shadow-top" }), !this.noShadowX && index.h("div", { class: "shadow-left" }), !this.noShadowX && index.h("div", { class: "shadow-right" }), !this.noShadowY && index.h("div", { class: "shadow-bottom" })),
10182
+ index.h("div", { key: '9552a4a4a86713effab40df3f95310dae5863f78', ref: el => (this.scrollElement = el), class: {
10041
10183
  'scrollable-content': true,
10042
10184
  'scroll-x': !this.noOverflowX,
10043
10185
  'scroll-y': !this.noOverflowY,
10044
10186
  'no-overscroll': this.noOverscroll
10045
- } }, index.h("slot", { key: '58770dc6389091b4fcd010b0ef867098bbdbd324' }))
10187
+ } }, index.h("slot", { key: 'acc0afcb95539ad6db29c6a96b2673892f2d9153' }))
10046
10188
  ];
10047
10189
  }
10048
10190
  attachEmitter(from, emitter) {
@@ -10986,7 +11128,7 @@ const CatSelectTest = class {
10986
11128
  setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);
10987
11129
  }
10988
11130
  render() {
10989
- return (index.h(index.Host, { key: '917d1993ffdeb3df253cb69c4f91670bae865ffe', style: { display: 'flex', flexDirection: 'column' }, class: "cat-form" }, index.h("cat-select", { key: '0783adb9958ab099ee05514ab1eff2c2e9c19a3d', 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", { key: 'a022a3f75759761d9f8cc75855c15c8bd577ec6d', slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { key: '6e5ff0f3f69a6b8eb812a73243de623afe6958aa', label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: 'f1f365f238c40179536fed2fdecf9562e9a2313b', label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: '3444b60c5c4e65e96288f0773e0a1fa1aa2e6418', 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", { key: '9de06f744b6b072184fd8b5d25f1ecd1e6377152', 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", { key: '64e4286713877e81dbd587a2b46a4836d3e6a003', 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", { key: 'd3a3435025715aa6b2cfb82ca7093ebfc6537038', label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), index.h("cat-dropdown", { key: '24a8e325652f4fac91a7548d1c7db43930ae3dba', overflow: true }, index.h("cat-button", { key: 'fe655431da67831a02855510e864d65895efc20e', slot: "trigger", style: { width: '50%' } }, "Open select"), index.h("div", { key: '01fc39c99c6f2bc2eabda4c8a26ab6aa46ea49d3', slot: "content", style: { width: '400px' } }, index.h("cat-select", { key: '7bd02aadc9a84797f4868e9a236e9af7245a2bd7', 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%' } })))));
11131
+ return (index.h(index.Host, { key: 'fbbdfc05bd034597b84d235445b70c526ed17dd4', style: { display: 'flex', flexDirection: 'column' }, class: "cat-form" }, index.h("cat-select", { key: 'e88f94e3022868b3ec6ca75a704a45edac6dedc6', 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", { key: 'a5e00768df01e4f91dfd2b4b3f62a998df32bf7d', slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { key: '935aacbe810131079d95d61d9e6fd2efbec03d01', label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: '0b8fbe7e2ec42acf7cbd01fd216d0909befd30a2', label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: '509741cf8a8f6438649f2a4debe0829fd3b905eb', 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", { key: 'a42ff7c4b8f1686fa0cdbd5a202b4bff59f7e599', 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", { key: 'e29353e92663b785844080bf6ef6937348c80379', 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", { key: 'a53e0848faed0a98be3d2bc6e81c1e21c82cbc9c', label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), index.h("cat-dropdown", { key: 'f6173b84ec5d84401dbc7190c6e09719c0412f26', overflow: true }, index.h("cat-button", { key: '4d45f4bd17867cb4d54078f503e8613441e04374', slot: "trigger", style: { width: '50%' } }, "Open select"), index.h("div", { key: '2736181440e085cf623c2c3c875edaab23f71a3e', slot: "content", style: { width: '400px' } }, index.h("cat-select", { key: '9fa27d270fc984bd22ef82de2e54e7ac952f71a2', 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%' } })))));
10990
11132
  }
10991
11133
  get countryConnector() {
10992
11134
  return {
@@ -12242,7 +12384,7 @@ const CatSkeleton = class {
12242
12384
  this.lines = undefined;
12243
12385
  }
12244
12386
  render() {
12245
- return (index.h(index.Host, { key: 'a19807a77a26996cffe07ac155ad7765618b5845' }, Array.from(Array(this.count)).map(() => (index.h("div", { style: this.style, class: {
12387
+ return (index.h(index.Host, { key: '8f1e4584c050cc8b6d1341efd3d8b04ca7223a73' }, Array.from(Array(this.count)).map(() => (index.h("div", { style: this.style, class: {
12246
12388
  skeleton: true,
12247
12389
  [`skeleton-${this.effect}`]: Boolean(this.effect),
12248
12390
  [`skeleton-${this.variant}`]: Boolean(this.variant),
@@ -12282,9 +12424,9 @@ const CatSpinner = class {
12282
12424
  this.a11yLabel = undefined;
12283
12425
  }
12284
12426
  render() {
12285
- return (index.h("span", { key: '9959df68cbff0d66f606eddd9ad4d28e6387016c', "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
12427
+ return (index.h("span", { key: 'cf1110c7ae2c653c87f44f2668aa3bcc757ed0c9', "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
12286
12428
  [`spinner-${this.size}`]: this.size !== 'inline'
12287
- } }, index.h("svg", { key: '5f1f119ac83d334ef537e58a18631b064504de42', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, index.h("circle", { key: 'c86f44033ed4cd7b13e08332dd0219001a1aa05d', cx: "24", cy: "24", r: "21.5" }))));
12429
+ } }, index.h("svg", { key: '22d1a1c15575274a75d4203ae9a1c945a199759d', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, index.h("circle", { key: 'f067c870a5699603761b7d8d6e4a32354cef6f7e', cx: "24", cy: "24", r: "21.5" }))));
12288
12430
  }
12289
12431
  };
12290
12432
  CatSpinner.style = CatSpinnerStyle0;
@@ -12316,7 +12458,7 @@ const CatTab = class {
12316
12458
  this.catClick.emit(event);
12317
12459
  }
12318
12460
  render() {
12319
- return index.h(index.Host, { key: 'd82385eb808736eea3c76a3df8381b9d4e0d742e' });
12461
+ return index.h(index.Host, { key: 'e0b1e0562a35130f4b0de08530eb66c9df5ec145' });
12320
12462
  }
12321
12463
  get hostElement() { return index.getElement(this); }
12322
12464
  };
@@ -12380,7 +12522,7 @@ const CatTabs = class {
12380
12522
  this.activate(this.tabs[index]);
12381
12523
  }
12382
12524
  render() {
12383
- return (index.h(index.Host, { key: '94b84f077e41ac18206865152cabfc9f3a51ccc0' }, this.tabs.map((tab) => {
12525
+ return (index.h(index.Host, { key: '05969fc6e983159aaad4a36ab07b6326c5c85589' }, this.tabs.map((tab) => {
12384
12526
  return (index.h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
12385
12527
  'cat-tab': true,
12386
12528
  'cat-tab-active': tab.id === this.activeTab,
@@ -12500,15 +12642,15 @@ const CatTextarea = class {
12500
12642
  }
12501
12643
  }
12502
12644
  render() {
12503
- return (index.h(index.Host, { key: 'cb67b2133a56d47e02cc099e0a52670d8b2ba808' }, index.h("div", { key: 'bd7af8f7626ea32983a2cd2595556722b9384384', class: {
12645
+ return (index.h(index.Host, { key: '2fac5152cbeeb9d4a9c4dc0f9539bb1a1503c9e8' }, index.h("div", { key: '88d992d98f72a0862b3736ad102a0124363e17b6', class: {
12504
12646
  'textarea-field': true,
12505
12647
  'textarea-horizontal': this.horizontal
12506
- } }, index.h("div", { key: '58eaf7f6f077148933667818c80ba7c61f3f599c', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, part: "label" }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').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", { key: '697555f611a053df4df7dfe12cbd7e6fdcb4f0a1', class: "textarea-container" }, index.h("div", { key: '85c1b4a93bf03b3b6046f310bbb841d312638d3b', class: {
12648
+ } }, index.h("div", { key: 'ab23b2ebcc13b7511c4e951041817bb8b1952c0c', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, part: "label" }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').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", { key: '30a02b82d605c5e416a63b8eef5205d41139ce6d', class: "textarea-container" }, index.h("div", { key: '32aad8e1e15134dad90e991cc3e471b06dcbc9fd', class: {
12507
12649
  'textarea-wrapper': true,
12508
12650
  'textarea-readonly': this.readonly,
12509
12651
  'textarea-disabled': this.disabled,
12510
12652
  'textarea-invalid': this.invalid
12511
- } }, index.h("textarea", { key: '2646d5e59ea09e361c87ad1635d641c9ce2d1fb6', ...this.nativeAttributes, part: "textarea", ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
12653
+ } }, index.h("textarea", { key: '96d5a02bfdb1c7feb85ce02380a59ff63a7d1760', ...this.nativeAttributes, part: "textarea", ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
12512
12654
  }
12513
12655
  get hasHint() {
12514
12656
  return !!this.hint || !!this.hasSlottedHint || this.invalid;
@@ -12568,6 +12710,9 @@ function getLocale(language) {
12568
12710
  timeFormat: getHour12(language) ? '12' : '24'
12569
12711
  };
12570
12712
  }
12713
+ function formatIso(date) {
12714
+ return `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
12715
+ }
12571
12716
 
12572
12717
  function clampTime(min, date, max) {
12573
12718
  const [, hhMin, mmMin] = min?.match(/(\d{2}):(\d{2})/)?.map(Number) ?? [];
@@ -12638,6 +12783,16 @@ const CatTime = class {
12638
12783
  this.placement = 'bottom-end';
12639
12784
  this.step = 30;
12640
12785
  }
12786
+ onMinChanged(min, oldMin) {
12787
+ if (min !== oldMin) {
12788
+ this.reclamp('min', min);
12789
+ }
12790
+ }
12791
+ onMaxChanged(max, oldMax) {
12792
+ if (max !== oldMax) {
12793
+ this.reclamp('max', max);
12794
+ }
12795
+ }
12641
12796
  componentWillLoad() {
12642
12797
  this.syncValue(this.value ?? '');
12643
12798
  }
@@ -12655,9 +12810,9 @@ const CatTime = class {
12655
12810
  onOpen() {
12656
12811
  const query = (selector) => this.hostElement.shadowRoot?.querySelector(selector);
12657
12812
  const time = clampTime(this.min ?? null, this.selectionTime ?? new Date(2000, 5, 1, 8), this.max ?? null);
12658
- const elem1 = query(`[data-time="${this.formatIso(time)}"]`);
12813
+ const elem1 = query(`[data-time="${formatIso(time)}"]`);
12659
12814
  time.setMinutes(Math.floor(time.getMinutes() / this.step) * this.step);
12660
- const elem2 = query(`[data-time="${this.formatIso(time)}"]`);
12815
+ const elem2 = query(`[data-time="${formatIso(time)}"]`);
12661
12816
  setTimeout(() => {
12662
12817
  (elem2 ?? elem1)?.doFocus();
12663
12818
  (elem2 ?? elem1)?.scrollIntoView(this.selectionTime ? { block: 'center' } : undefined);
@@ -12678,7 +12833,7 @@ const CatTime = class {
12678
12833
  const time = clampTime(this.min ?? null, date, this.max ?? null);
12679
12834
  this.isAm = this.format(time).toLowerCase().includes('am');
12680
12835
  this.selectionTime = time;
12681
- this.value = this.formatIso(time);
12836
+ this.value = formatIso(time);
12682
12837
  }
12683
12838
  // we need to set the input explicitly to sync the input even without a
12684
12839
  // rerender (if the value is not changed)
@@ -12713,8 +12868,8 @@ const CatTime = class {
12713
12868
  this.input?.clear();
12714
12869
  }
12715
12870
  render() {
12716
- return (index.h(index.Host, { key: '417fe04aff5d229b3f99595cd464ed1b35a64655' }, index.h("cat-input", { key: 'a240ad76627fcc5013d8e51e0728e0296dbb0e42', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, index.h("span", { key: 'cf2026f70a32a5df5331b82d1d64cb4695a0b42e', slot: "label" }, this.hasSlottedLabel && index.h("slot", { name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: '46b4a5363823a48d5569f77bcbadbaf0ef93e7b1', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: 'cfad61c399b5b4a487b211976e61c3e33fb37a98', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: '2a158234c4cc55920105b326cdf31fbe02fedfb7', slot: "addon", placement: this.placement }, index.h("cat-button", { key: '1aa21b054ef608a4f1e9cc32312a762fa64d8b2d', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), index.h("nav", { key: 'dd604da9f2244c970ca62ca68385cc86d0b98bef', slot: "content", class: "cat-nav" }, index.h("ul", { key: '3c5e331defd7f192c27aab7085f5337a2eaf0fe7' }, this.timeArray().map(time => {
12717
- const isoTime = this.formatIso(time);
12871
+ return (index.h(index.Host, { key: 'c7ebe7c00d372720ce9c34907438f47150df0820' }, index.h("cat-input", { key: 'e83d9bddbdff4d1e0c97531f3684618e0f4251a8', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, index.h("span", { key: '504e24bcf7d7fa3e0eddb7df91261778e720cc87', slot: "label" }, this.hasSlottedLabel && index.h("slot", { name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: 'c617e13394f44bd851beae13e809f791a56dfa42', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: '601bd57b6137a44901a3d32ce10f881aae67a2a8', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: 'ecdd2fb5987eb30890c9258ece4bd1e176b2d6c6', slot: "addon", placement: this.placement }, index.h("cat-button", { key: 'a38158d199940ff276b5263833c39cdbea04d194', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), index.h("nav", { key: 'e2e77112f74467cc2db37d24f38165389888978a', slot: "content", class: "cat-nav" }, index.h("ul", { key: 'c005ac2b43037f3e5953117e968a967ce60be477' }, this.timeArray().map(time => {
12872
+ const isoTime = formatIso(time);
12718
12873
  const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
12719
12874
  return (index.h("li", null, index.h("cat-button", { class: {
12720
12875
  'cat-nav-item': true,
@@ -12763,14 +12918,27 @@ const CatTime = class {
12763
12918
  : '';
12764
12919
  return includeAmPm ? str : str.replace(/\s?(am|pm)/i, '');
12765
12920
  }
12766
- formatIso(date) {
12767
- return `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
12921
+ reclamp(mode, limit) {
12922
+ if (!this.value)
12923
+ return;
12924
+ const min = (mode === 'min' ? limit : this.min) ?? null;
12925
+ const max = (mode === 'max' ? limit : this.max) ?? null;
12926
+ const [match, hh, mm] = this.value.match(/(\d{2}):(\d{2})/) ?? [];
12927
+ const newValue = match ? formatIso(clampTime(min, new Date(2000, 5, 1, Number(hh), Number(mm)), max)) : undefined;
12928
+ if (this.value !== newValue) {
12929
+ this.syncValue(newValue ?? '');
12930
+ this.catChange.emit(newValue);
12931
+ }
12768
12932
  }
12769
12933
  get hostElement() { return index.getElement(this); }
12934
+ static get watchers() { return {
12935
+ "min": ["onMinChanged"],
12936
+ "max": ["onMaxChanged"]
12937
+ }; }
12770
12938
  };
12771
12939
  CatTime.style = CatTimeStyle0;
12772
12940
 
12773
- const catToggleCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.5rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle-placeholder{width:calc(2rem + 1px);flex-shrink:0}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 125ms ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:\"\";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 125ms linear;box-shadow:0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";
12941
+ const catToggleCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle-placeholder{width:calc(2rem + 1px);flex-shrink:0}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 125ms ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:\"\";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 125ms linear;box-shadow:0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";
12774
12942
  const CatToggleStyle0 = catToggleCss;
12775
12943
 
12776
12944
  let nextUniqueId$1 = 0;
@@ -12828,7 +12996,7 @@ const CatToggle = class {
12828
12996
  this.input.blur();
12829
12997
  }
12830
12998
  render() {
12831
- return (index.h(index.Host, { key: '1cc91400d302cd19fa92216ec3fdf45ae869b761' }, index.h("label", { key: '981ac74c7a9aa3324cab60067849e2ffff9d4158', htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled, 'label-left': this.labelLeft } }, index.h("input", { key: 'f4c1a4398f73d2c3da8fd26b360d4a4d94dae3c3', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, class: "form-check-input", role: "switch", onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), index.h("span", { key: '4a8c4e21fcb48dc3f2260d5abfcf2351fa0eeb13', class: "toggle" }), index.h("span", { key: 'b911ffc5f29252efba3989e494eca1c5ec0fbd54', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label)), this.hasHint && (index.h("div", { class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { class: "toggle-placeholder" }), index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
12999
+ return (index.h(index.Host, { key: '08337e6aece1d072c3c4540e4c5e97562a0c1f4c' }, index.h("label", { key: '79b0b9d2d136125ba7f15be32a3a34da73488a2f', htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled, 'label-left': this.labelLeft } }, index.h("input", { key: '0c22754e817b0d6eab349583287c8d30f25f84ad', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, class: "form-check-input", role: "switch", onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), index.h("span", { key: '7a08a4ec1fc79d18c16065697f672bf7f4e35908', class: "toggle" }), index.h("span", { key: 'b78eacbcb262452ba33972f2647dc69b01c1bd20', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label)), this.hasHint && (index.h("div", { class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { class: "toggle-placeholder" }), index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
12832
13000
  }
12833
13001
  get hasHint() {
12834
13002
  return !!this.hint || !!this.hasSlottedHint;
@@ -12915,12 +13083,12 @@ const CatTooltip = class {
12915
13083
  }
12916
13084
  }
12917
13085
  render() {
12918
- return (index.h(index.Host, { key: 'f1bfba8c8ce1a2d43959b18b00627af819536428' }, index.h("slot", { key: '0366fe88ce8bd0382beed9c298dbd945cad70bec' }), index.h("div", { key: 'dd9f7cd786780cd64e3fa2670f516eda71d15351', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
13086
+ return (index.h(index.Host, { key: '742d0c7f6203b8e685886f1c272562176b348fa9' }, index.h("slot", { key: '0e7bf66c6aadcf0b87fbbadf2d3e357ebb9b98c0' }), index.h("div", { key: '14eaa638d2f3170be57188d32841e22c98f1319b', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
12919
13087
  tooltip: true,
12920
13088
  'tooltip-hidden': this.inactive,
12921
13089
  'tooltip-round': this.round,
12922
13090
  [`tooltip-${this.size}`]: Boolean(this.size)
12923
- } }, index.h("slot", { key: '2a6f92d2cfc845849730792f08e65ffb70c03e5f', name: "content" }, index.h("p", { key: '23b8d57bcb92506d5c88a59261716158b0daa0ba' }, this.content)))));
13091
+ } }, index.h("slot", { key: '724fac6b27719c0cb9d243aab8ab4485fa72fc43', name: "content" }, index.h("p", { key: '2d6c325c46035725ac8c81330038888eefeb0c89' }, this.content)))));
12924
13092
  }
12925
13093
  async update() {
12926
13094
  if (this.trigger && this.tooltip) {
@@ -13008,6 +13176,7 @@ exports.cat_button_group = CatButtonGroup;
13008
13176
  exports.cat_card = CatCard;
13009
13177
  exports.cat_checkbox = CatCheckbox;
13010
13178
  exports.cat_date = CatDate;
13179
+ exports.cat_date_inline = CatDateInline;
13011
13180
  exports.cat_datepicker = CatDatepickerFlat;
13012
13181
  exports.cat_datepicker_inline = CatDatepickerInline;
13013
13182
  exports.cat_dropdown = CatDropdown;
@@ -13029,4 +13198,4 @@ exports.cat_time = CatTime;
13029
13198
  exports.cat_toggle = CatToggle;
13030
13199
  exports.cat_tooltip = CatTooltip;
13031
13200
 
13032
- //# sourceMappingURL=cat-alert_28.cjs.entry.js.map
13201
+ //# sourceMappingURL=cat-alert_29.cjs.entry.js.map