@mcp-b/web-components 0.2.22 → 0.3.1

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 (167) hide show
  1. package/README.md +93 -30
  2. package/dist/{alert-dialog-D25Oi_TS.js → alert-dialog-CGUwj_0U.js} +1 -1
  3. package/dist/{button-gg3JJxQZ.js → button-BbabhtKj.js} +121 -77
  4. package/dist/{button-BQofnUt4.d.ts → button-c5YKsC69.d.ts} +6 -3
  5. package/dist/{checkbox-DoFcDEKB.d.ts → checkbox-BtoypUxD.d.ts} +0 -6
  6. package/dist/{checkbox-C96lUDIM.js → checkbox-C97tlcf2.js} +11 -43
  7. package/dist/{color-input-Gae_-9w-.js → color-input-Dtp1v7A-.js} +14 -54
  8. package/dist/{color-input-Bky89xg_.d.ts → color-input-S29ZHwHE.d.ts} +0 -5
  9. package/dist/{color-picker-BYyZavkT.js → color-picker-Mnpc5u6E.js} +8 -4
  10. package/dist/{combobox-iERnTD3A.js → combobox-D4ji7M2B.js} +12 -33
  11. package/dist/{combobox-item-D2H1CMxC.d.ts → combobox-item-BnBtZyhw.d.ts} +3 -6
  12. package/dist/{comparison-B1-nMwmp.d.ts → comparison-CRvbwS7X.d.ts} +1 -0
  13. package/dist/{comparison-HJ1Zedhs.js → comparison-DQUpvkmg.js} +11 -3
  14. package/dist/components/alert-dialog/alert-dialog.js +1 -1
  15. package/dist/components/button/button.d.ts +1 -1
  16. package/dist/components/button/button.js +1 -1
  17. package/dist/components/carousel/carousel.js +1 -1
  18. package/dist/components/checkbox/checkbox.d.ts +1 -1
  19. package/dist/components/checkbox/checkbox.js +1 -1
  20. package/dist/components/color-input/color-input.d.ts +1 -1
  21. package/dist/components/color-input/color-input.js +1 -1
  22. package/dist/components/color-picker/color-picker.js +1 -1
  23. package/dist/components/combobox/combobox.d.ts +1 -1
  24. package/dist/components/combobox/combobox.js +1 -1
  25. package/dist/components/combobox-item/combobox-item.d.ts +1 -1
  26. package/dist/components/comparison/comparison.d.ts +1 -1
  27. package/dist/components/comparison/comparison.js +1 -1
  28. package/dist/components/copy/copy.js +4 -20
  29. package/dist/components/date/date.d.ts +1 -1
  30. package/dist/components/date/date.js +1 -1
  31. package/dist/components/dialog/dialog.js +1 -1
  32. package/dist/components/dropdown/dropdown.d.ts +1 -1
  33. package/dist/components/dropdown/dropdown.js +1 -1
  34. package/dist/components/expander/expander.js +1 -1
  35. package/dist/components/file-input/file-input.d.ts +1 -1
  36. package/dist/components/file-input/file-input.js +1 -1
  37. package/dist/components/filter-bar/filter-bar.js +1 -1
  38. package/dist/components/index.d.ts +24 -24
  39. package/dist/components/index.js +48 -48
  40. package/dist/components/infinite-scroller/infinite-scroller.js +1 -1
  41. package/dist/components/intersection-observer/intersection-observer.js +1 -1
  42. package/dist/components/listbox/listbox.d.ts +1 -1
  43. package/dist/components/listbox/listbox.js +1 -1
  44. package/dist/components/mutation-observer/mutation-observer.js +1 -1
  45. package/dist/components/navicon/navicon.js +1 -1
  46. package/dist/components/number/number.js +1 -1
  47. package/dist/components/number-field/number-field.d.ts +1 -1
  48. package/dist/components/number-field/number-field.js +1 -1
  49. package/dist/components/pagination/pagination.js +1 -1
  50. package/dist/components/popover/popover.js +1 -1
  51. package/dist/components/preview-card/preview-card.js +1 -1
  52. package/dist/components/radio/radio.d.ts +1 -1
  53. package/dist/components/radio/radio.js +1 -1
  54. package/dist/components/radio-item/radio-item.js +1 -1
  55. package/dist/components/rating/rating.d.ts +1 -1
  56. package/dist/components/rating/rating.js +1 -1
  57. package/dist/components/resize-observer/resize-observer.js +1 -1
  58. package/dist/components/scroller/scroller.js +1 -1
  59. package/dist/components/search-list/search-list.d.ts +1 -1
  60. package/dist/components/search-list/search-list.js +1 -1
  61. package/dist/components/select/select.d.ts +1 -1
  62. package/dist/components/select/select.js +1 -1
  63. package/dist/components/share/share.js +1 -1
  64. package/dist/components/slide-activator/slide-activator.d.ts +1 -1
  65. package/dist/components/slide-activator/slide-activator.js +1 -1
  66. package/dist/components/slider/slider.d.ts +1 -1
  67. package/dist/components/slider/slider.js +1 -1
  68. package/dist/components/spinner/spinner.js +1 -1
  69. package/dist/components/splitter/splitter.d.ts +1 -1
  70. package/dist/components/splitter/splitter.js +1 -1
  71. package/dist/components/switch/switch.d.ts +1 -1
  72. package/dist/components/switch/switch.js +1 -1
  73. package/dist/components/tab-list/tab-list.js +1 -1
  74. package/dist/components/text-area/text-area.d.ts +1 -1
  75. package/dist/components/text-area/text-area.js +1 -1
  76. package/dist/components/text-field/text-field.d.ts +1 -1
  77. package/dist/components/text-field/text-field.js +1 -1
  78. package/dist/components/timed-content/timed-content.js +1 -1
  79. package/dist/components/toast/toast.d.ts +1 -1
  80. package/dist/components/toast/toast.js +1 -1
  81. package/dist/components/toast-item/toast-item.js +1 -1
  82. package/dist/components/toggle-icon/toggle-icon.d.ts +1 -1
  83. package/dist/components/toggle-icon/toggle-icon.js +1 -1
  84. package/dist/components/toggle-tag/toggle-tag.d.ts +1 -1
  85. package/dist/components/toggle-tag/toggle-tag.js +1 -1
  86. package/dist/components/tooltip/tooltip.js +1 -1
  87. package/dist/components/transition-group/transition-group.d.ts +1 -1
  88. package/dist/components/transition-group/transition-group.js +1 -1
  89. package/dist/components/zoomable-frame/zoomable-frame.js +1 -1
  90. package/dist/{date-6M6wfa8L.d.ts → date-DtaTBM71.d.ts} +1 -1
  91. package/dist/docs/custom-elements.json +126 -171
  92. package/dist/{dropdown-DM4tlF_p.js → dropdown-BPOpCp59.js} +58 -34
  93. package/dist/{dropdown-Bo00Vlr5.d.ts → dropdown-C5ldJu4g.d.ts} +5 -1
  94. package/dist/{localize-322EtXNX.d.ts → en-ss05iPjS.d.ts} +4 -1
  95. package/dist/{file-input-vZFm22Lo.js → file-input-B4VfcfTD.js} +17 -33
  96. package/dist/{file-input-D2D6YC0B.d.ts → file-input-CgsTcC1R.d.ts} +0 -5
  97. package/dist/{filter-bar-DJuDlx5f.js → filter-bar-DhQSMr3S.js} +1 -1
  98. package/dist/index.d.ts +25 -27
  99. package/dist/index.js +49 -52
  100. package/dist/{infinite-scroller-BmmtnWNt.js → infinite-scroller-DjeMswwE.js} +2 -2
  101. package/dist/{intersection-observer-B6TciOAQ.js → intersection-observer-Db0-7ZvZ.js} +1 -1
  102. package/dist/{listbox-B0geidHW.js → listbox-BGHw-rUd.js} +13 -28
  103. package/dist/{listbox-DD4ujIJe.d.ts → listbox-DKoMIQA6.d.ts} +3 -5
  104. package/dist/{mutation-observer-DS8EBuOp.js → mutation-observer-DkhonHyD.js} +1 -1
  105. package/dist/{number-field-odk4lKXM.d.ts → number-field-T0rzObq9.d.ts} +0 -5
  106. package/dist/{number-field-BGH7JtNf.js → number-field-yME3rRZT.js} +44 -55
  107. package/dist/{popover-DJBrJ0za.js → popover-lsI6gqNk.js} +9 -32
  108. package/dist/{preview-card-C7H1FPfd.js → preview-card-D1msvOWP.js} +1 -1
  109. package/dist/{radio-8UZAUYXt.js → radio-4Cok4gJI.js} +11 -28
  110. package/dist/{radio-CieMa4zU.d.ts → radio-B4fz924Q.d.ts} +1 -4
  111. package/dist/{radio-item-BlhFgXsU.js → radio-item-DpP3GBPV.js} +2 -3
  112. package/dist/{rating-4xNsWumY.d.ts → rating-8BLXhAVl.d.ts} +1 -3
  113. package/dist/{rating-C1BcJDIO.js → rating-CSn-nU2R.js} +24 -34
  114. package/dist/{resize-observer-DcrLhddo.js → resize-observer-Dg9Cm9e5.js} +1 -1
  115. package/dist/{search-list-Clmrg8EV.js → search-list-BffPIgnw.js} +19 -10
  116. package/dist/{search-list-n0GYO7rh.d.ts → search-list-Cd3--X7Q.d.ts} +11 -1
  117. package/dist/{select-CkZK2jJn.d.ts → select-6H_sN4A2.d.ts} +0 -5
  118. package/dist/{select-DLIaRnA4.js → select-B6nkY6E-.js} +7 -43
  119. package/dist/{share-bsgXZCl7.js → share-C7dB9NYf.js} +3 -19
  120. package/dist/{slide-activator-D7bBz69E.d.ts → slide-activator-CB0Ztk_u.d.ts} +1 -0
  121. package/dist/{slide-activator-Dm1EvZtL.js → slide-activator-Dkv5_KPl.js} +10 -3
  122. package/dist/{slider-B90Il7x3.js → slider-DY-GuC8T.js} +35 -46
  123. package/dist/{slider-B0FVsV1o.d.ts → slider-uQQ-T_kn.d.ts} +2 -3
  124. package/dist/{splitter-MnD4In9H.js → splitter-DzC0hXGN.js} +14 -3
  125. package/dist/{splitter-DBDJAzsp.d.ts → splitter-KQVgGdvP.d.ts} +1 -0
  126. package/dist/{switch-Cief9M59.d.ts → switch-BUfFo074.d.ts} +0 -6
  127. package/dist/{switch-D0hWr37A.js → switch-Chij-EaQ.js} +11 -43
  128. package/dist/{tab-list-B_Ye_Oj9.js → tab-list-CVOUSpAh.js} +2 -2
  129. package/dist/{text-area-B_mjCE9W.d.ts → text-area-DFMKyk8y.d.ts} +0 -3
  130. package/dist/{text-area-Czixaz-_.js → text-area-DZVghSkO.js} +14 -51
  131. package/dist/{text-field-BClWMp6q.d.ts → text-field-DepP1gei.d.ts} +0 -5
  132. package/dist/{text-field-Cznb4Afc.js → text-field-gX5RovkE.js} +11 -52
  133. package/dist/{timed-content-pvEP4l5V.js → timed-content-D00na-5r.js} +1 -0
  134. package/dist/{toast-cEBVK9NQ.d.ts → toast-CpyA3GYM.d.ts} +1 -1
  135. package/dist/{toast-DgkBQzQC.js → toast-CxfaWFY_.js} +2 -2
  136. package/dist/{toggle-icon-4oLDeEt4.js → toggle-icon-B3fZuslO.js} +9 -31
  137. package/dist/{toggle-icon-DlwMMWZL.d.ts → toggle-icon-sTLCOruF.d.ts} +0 -5
  138. package/dist/{toggle-tag-1sfTFJtg.js → toggle-tag--Gkp-CJJ.js} +7 -35
  139. package/dist/{toggle-tag-IVvMGT4R.d.ts → toggle-tag-DDBa6hAg.d.ts} +0 -5
  140. package/dist/{tooltip-DbyoPFNe.js → tooltip-bSXNhG9l.js} +9 -32
  141. package/dist/{transition-group-3hnAnwSd.js → transition-group-8PmQx0A5.js} +23 -4
  142. package/dist/{transition-group-DD_CjSNC.d.ts → transition-group-D134iT1k.d.ts} +8 -0
  143. package/dist/translations/en.d.ts +1 -5
  144. package/dist/translations/en.js +3 -6
  145. package/dist/translations/es.d.ts +1 -1
  146. package/dist/translations/es.js +2 -5
  147. package/dist/types/custom-element-jsx.d.ts +26 -10
  148. package/dist/utilities/anchored-surface.d.ts +36 -0
  149. package/dist/utilities/anchored-surface.js +46 -0
  150. package/dist/utilities/copy-feedback.d.ts +16 -0
  151. package/dist/utilities/copy-feedback.js +33 -0
  152. package/dist/utilities/form-validity.d.ts +28 -0
  153. package/dist/utilities/form-validity.js +33 -0
  154. package/dist/utilities/localize.d.ts +1 -1
  155. package/dist/utilities/localize.js +1 -0
  156. package/package.json +3 -2
  157. package/dist/{carousel-XopKISBQ.js → carousel-DpIqPTuO.js} +1 -1
  158. package/dist/{date-CJPmOdi9.js → date-CFIR88pX.js} +1 -1
  159. package/dist/{dialog-Cx46HMaZ.js → dialog-Ddvyn2d_.js} +1 -1
  160. package/dist/{expander-Bwvxj6Oa.js → expander-CMV4QCha.js} +1 -1
  161. package/dist/{navicon-_yMHY27-.js → navicon-B-5pY9gq.js} +1 -1
  162. package/dist/{number-BNtNXNF3.js → number-BYBxfOGw.js} +1 -1
  163. package/dist/{pagination-CrTQnuNW.js → pagination-VOzVTV8p.js} +1 -1
  164. package/dist/{scroller-LYgBVyfY.js → scroller-DZATZlDa.js} +1 -1
  165. package/dist/{spinner-C04Dmc0H.js → spinner-C9lQARtQ.js} +1 -1
  166. package/dist/{toast-item-CGvz92Qk.js → toast-item-DzSPG25R.js} +1 -1
  167. package/dist/{zoomable-frame-DxcjLGcF.js → zoomable-frame-BrjVkNMX.js} +1 -1
@@ -1,5 +1,6 @@
1
1
  import "./icon-Df0H7LYB.js";
2
2
  import { t as __decorate } from "./decorate-DcF3lt7P.js";
3
+ import { mirrorNativeValidity } from "./utilities/form-validity.js";
3
4
  import { css, html } from "lit";
4
5
  import { property, query, state } from "lit/decorators.js";
5
6
  import hostStyles from "@mcp-b/wc-support/styles/host.styles";
@@ -63,9 +64,8 @@ var checkbox_styles_default = css`
63
64
  var(--sigvelo-motion-duration-interaction) border-color ease;
64
65
 
65
66
  &:has(:focus-visible) {
66
- outline: var(--sigvelo-border-style) calc(var(--sigvelo-border-width) + 1px)
67
- var(--sigvelo-color-focus);
68
- outline-offset: var(--sigvelo-border-width);
67
+ outline: var(--sigvelo-focus-ring);
68
+ outline-offset: var(--sigvelo-focus-offset);
69
69
  }
70
70
 
71
71
  /* Normal */
@@ -477,42 +477,17 @@ var SigveloCheckbox = class extends SigveloFormControlElement {
477
477
  get focusableAnchor() {
478
478
  return this.checkbox;
479
479
  }
480
- connectedCallback() {
481
- super.connectedCallback();
482
- this.addEventListener("invalid", this.handleHostInvalid);
483
- }
484
- disconnectedCallback() {
485
- super.disconnectedCallback();
486
- this.removeEventListener("invalid", this.handleHostInvalid);
487
- }
488
480
  updated(changedProperties) {
489
481
  this.updateValidity();
490
482
  if (changedProperties.has("checked") || changedProperties.has("value")) this.internals.setFormValue(this.checked ? this.value : null);
491
483
  if (changedProperties.has("checked")) this.customStates.set("checked", this.checked);
492
- if (changedProperties.has("disabled")) this.customStates.set("disabled", this.disabled);
493
- if (this.hadUserInteraction || this.wasSubmitted) {
494
- this.customStates.set("user-invalid", this.isInvalid);
495
- this.customStates.set("user-valid", !this.isInvalid);
496
- } else {
497
- this.customStates.set("user-invalid", false);
498
- this.customStates.set("user-valid", false);
499
- }
500
- }
501
- /** @internal Called when a containing fieldset is disabled. */
502
- formDisabledCallback(isDisabled) {
503
- this.disabled = isDisabled;
484
+ if (changedProperties.has("disabled")) this.customStates.set("disabled", this.effectiveDisabled);
504
485
  }
505
486
  /** @internal Called when the form is reset. */
506
487
  formResetCallback() {
507
- this.isInvalid = false;
508
- this.hadUserInteraction = false;
509
- this.wasSubmitted = false;
488
+ super.formResetCallback();
510
489
  this.checked = this.hasAttribute("checked");
511
490
  }
512
- handleClick() {
513
- this.checked = !this.checked;
514
- this.indeterminate = false;
515
- }
516
491
  handleBlur() {
517
492
  this.customStates.set("focused", false);
518
493
  this.dispatchEvent(new SigveloBlurEvent());
@@ -526,25 +501,19 @@ var SigveloCheckbox = class extends SigveloFormControlElement {
526
501
  }));
527
502
  }
528
503
  handleInput() {
504
+ this.checked = this.checkbox.checked;
505
+ this.indeterminate = this.checkbox.indeterminate;
529
506
  this.dispatchEvent(new SigveloInputEvent());
530
507
  }
531
508
  handleFocus() {
532
509
  this.customStates.set("focused", true);
533
510
  this.dispatchEvent(new SigveloFocusEvent());
534
511
  }
535
- handleHostInvalid() {
536
- this.wasSubmitted = true;
537
- }
538
512
  /** Sets the form control's validity */
539
513
  async updateValidity() {
540
514
  await this.updateComplete;
541
- const hasCustomValidity = this.getCustomValidity().length > 0;
542
- const validationMessage = hasCustomValidity ? this.getCustomValidity() : this.checkbox.validationMessage;
543
- const flags = {
544
- customError: hasCustomValidity,
545
- valueMissing: this.checkbox.validity.valueMissing
546
- };
547
- this.isInvalid = hasCustomValidity ? true : !this.checkbox.validity.valid;
515
+ const { flags, validationMessage, isInvalid } = mirrorNativeValidity(this.checkbox, this.getCustomValidity());
516
+ this.isInvalid = isInvalid;
548
517
  this.internals.setValidity(flags, validationMessage, this.focusableAnchor);
549
518
  }
550
519
  /** Sets focus to the checkbox. */
@@ -572,7 +541,7 @@ var SigveloCheckbox = class extends SigveloFormControlElement {
572
541
  xl: this.size === "xl",
573
542
  checked: this.checked,
574
543
  indeterminate: this.indeterminate,
575
- disabled: this.disabled,
544
+ disabled: this.effectiveDisabled,
576
545
  required: this.required
577
546
  })}
578
547
  >
@@ -582,11 +551,10 @@ var SigveloCheckbox = class extends SigveloFormControlElement {
582
551
  value=${ifDefined(this.value)}
583
552
  .indeterminate=${live(this.indeterminate)}
584
553
  .checked=${live(this.checked)}
585
- .disabled=${this.disabled}
554
+ .disabled=${this.effectiveDisabled}
586
555
  .required=${this.required}
587
556
  aria-describedby="description"
588
557
  @change=${this.handleChange}
589
- @click=${this.handleClick}
590
558
  @input=${this.handleInput}
591
559
  @focus=${this.handleFocus}
592
560
  @blur=${this.handleBlur}
@@ -1,6 +1,7 @@
1
- import { Localize } from "./utilities/localize.js";
2
1
  import { t as __decorate } from "./decorate-DcF3lt7P.js";
3
- import "./color-picker-BYyZavkT.js";
2
+ import { Localize } from "./utilities/localize.js";
3
+ import { mirrorNativeValidity } from "./utilities/form-validity.js";
4
+ import "./color-picker-Mnpc5u6E.js";
4
5
  import { css, html } from "lit";
5
6
  import { property, query, state } from "lit/decorators.js";
6
7
  import hostStyles from "@mcp-b/wc-support/styles/host.styles";
@@ -516,18 +517,10 @@ var SigveloColorInput = class extends SigveloFormControlElement {
516
517
  get focusableAnchor() {
517
518
  return this.textBox;
518
519
  }
519
- connectedCallback() {
520
- super.connectedCallback();
521
- this.addEventListener("invalid", this.handleHostInvalid);
522
- }
523
- disconnectedCallback() {
524
- super.disconnectedCallback();
525
- this.removeEventListener("invalid", this.handleHostInvalid);
526
- }
527
520
  async updated(changedProperties) {
528
521
  this.updateValidity();
529
- if (changedProperties.has("isOpen")) {
530
- if (this.disabled) this.isOpen = false;
522
+ if (changedProperties.has("isOpen") || this.effectiveDisabled && this.isOpen) {
523
+ if (this.effectiveDisabled) this.isOpen = false;
531
524
  this.customStates.set("open", this.isOpen);
532
525
  if (this.isOpen) this.showPicker();
533
526
  else this.hidePicker();
@@ -537,33 +530,17 @@ var SigveloColorInput = class extends SigveloFormControlElement {
537
530
  this.internals.setFormValue(this.value);
538
531
  this.preview.style.setProperty("--current-color", this.value);
539
532
  }
540
- if (changedProperties.has("disabled")) {
541
- if (this.disabled) this.isOpen = false;
542
- this.customStates.set("disabled", this.disabled);
543
- }
533
+ this.customStates.set("disabled", this.effectiveDisabled);
544
534
  if (changedProperties.has("format")) {
545
535
  if (this.value !== "") {
546
536
  await this.colorPicker.updateComplete;
547
537
  this.value = this.colorPicker.value;
548
538
  }
549
539
  }
550
- if (this.hadUserInteraction || this.wasSubmitted) {
551
- this.customStates.set("user-invalid", this.isInvalid);
552
- this.customStates.set("user-valid", !this.isInvalid);
553
- } else {
554
- this.customStates.set("user-invalid", false);
555
- this.customStates.set("user-valid", false);
556
- }
557
- }
558
- /** @internal Called when a containing fieldset is disabled. */
559
- formDisabledCallback(isDisabled) {
560
- this.disabled = isDisabled;
561
540
  }
562
541
  /** @internal Called when the form is reset. */
563
542
  formResetCallback() {
564
- this.isInvalid = false;
565
- this.hadUserInteraction = false;
566
- this.wasSubmitted = false;
543
+ super.formResetCallback();
567
544
  this.value = this.getAttribute("value") ?? "";
568
545
  }
569
546
  handleBlur() {
@@ -583,9 +560,6 @@ var SigveloColorInput = class extends SigveloFormControlElement {
583
560
  this.customStates.set("focused", true);
584
561
  this.dispatchEvent(new SigveloFocusEvent());
585
562
  }
586
- handleHostInvalid() {
587
- this.wasSubmitted = true;
588
- }
589
563
  handleClearClick() {
590
564
  this.hadUserInteraction = true;
591
565
  this.value = "";
@@ -629,7 +603,7 @@ var SigveloColorInput = class extends SigveloFormControlElement {
629
603
  const target = event.target;
630
604
  const isBox = target?.id === "visual-box";
631
605
  const isSlot = target.hasAttribute("slot");
632
- if (this.disabled) return;
606
+ if (this.effectiveDisabled) return;
633
607
  if (isBox || isSlot) event.preventDefault();
634
608
  if (!this.isOpen && !event.composedPath().includes(this.colorPicker)) {
635
609
  if (event.pointerType === "touch") event.preventDefault();
@@ -661,21 +635,8 @@ var SigveloColorInput = class extends SigveloFormControlElement {
661
635
  /** Sets the form control's validity */
662
636
  async updateValidity() {
663
637
  await this.updateComplete;
664
- const hasCustomValidity = this.getCustomValidity().length > 0;
665
- const validationMessage = hasCustomValidity ? this.getCustomValidity() : this.textBox.validationMessage;
666
- const flags = {
667
- badInput: this.textBox.validity.badInput,
668
- customError: hasCustomValidity,
669
- patternMismatch: this.textBox.validity.patternMismatch,
670
- rangeOverflow: this.textBox.validity.rangeOverflow,
671
- rangeUnderflow: this.textBox.validity.rangeUnderflow,
672
- stepMismatch: this.textBox.validity.stepMismatch,
673
- tooLong: this.textBox.validity.tooLong,
674
- tooShort: this.textBox.validity.tooShort,
675
- typeMismatch: this.textBox.validity.typeMismatch,
676
- valueMissing: this.textBox.validity.valueMissing
677
- };
678
- this.isInvalid = hasCustomValidity ? true : !this.textBox.validity.valid;
638
+ const { flags, validationMessage, isInvalid } = mirrorNativeValidity(this.textBox, this.getCustomValidity());
639
+ this.isInvalid = isInvalid;
679
640
  this.internals.setValidity(flags, validationMessage, this.focusableAnchor);
680
641
  }
681
642
  /** Removes focus from the color input. */
@@ -710,7 +671,7 @@ var SigveloColorInput = class extends SigveloFormControlElement {
710
671
  }
711
672
  /** Shows the color picker. */
712
673
  async showPicker() {
713
- if (this.disabled) return;
674
+ if (this.effectiveDisabled || this.colorPicker.matches(":popover-open")) return;
714
675
  openColorPickers.forEach((picker) => picker.isOpen = false);
715
676
  this.colorPicker.showPopover();
716
677
  this.isOpen = true;
@@ -725,7 +686,6 @@ var SigveloColorInput = class extends SigveloFormControlElement {
725
686
  }
726
687
  /** Hides the color picker. */
727
688
  async hidePicker() {
728
- if (this.disabled) return;
729
689
  this.isOpen = false;
730
690
  openColorPickers.delete(this);
731
691
  document.removeEventListener("keydown", this.handleDocumentKeyDown);
@@ -767,7 +727,7 @@ var SigveloColorInput = class extends SigveloFormControlElement {
767
727
  lg: this.size === "lg",
768
728
  xl: this.size === "xl",
769
729
  pill: this.pill,
770
- disabled: this.disabled
730
+ disabled: this.effectiveDisabled
771
731
  })}
772
732
  @pointerdown=${this.handleVisualBoxPointerDown}
773
733
  >
@@ -777,7 +737,7 @@ var SigveloColorInput = class extends SigveloFormControlElement {
777
737
  part="text-box"
778
738
  type="text"
779
739
  ?autofocus=${this.autofocus}
780
- ?disabled=${this.disabled}
740
+ ?disabled=${this.effectiveDisabled}
781
741
  ?readonly=${this.readonly}
782
742
  ?required=${this.required}
783
743
  placeholder=${ifDefined(this.placeholder)}
@@ -800,7 +760,7 @@ var SigveloColorInput = class extends SigveloFormControlElement {
800
760
  @keydown=${this.handleTextBoxKeyDown}
801
761
  />
802
762
 
803
- ${this.withClear && this.value?.length > 0 && !this.disabled && !this.readonly ? html`
763
+ ${this.withClear && this.value?.length > 0 && !this.effectiveDisabled && !this.readonly ? html`
804
764
  <button
805
765
  id="clear-button"
806
766
  part="clear-button"
@@ -412,17 +412,12 @@ declare class SigveloColorInput extends SigveloFormControlElement {
412
412
  * virtual keyboard to be displayed on supported devices.
413
413
  */
414
414
  inputmode: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
415
- connectedCallback(): void;
416
- disconnectedCallback(): void;
417
415
  updated(changedProperties: PropertyValues<this>): Promise<void>;
418
- /** @internal Called when a containing fieldset is disabled. */
419
- formDisabledCallback(isDisabled: boolean): void;
420
416
  /** @internal Called when the form is reset. */
421
417
  formResetCallback(): void;
422
418
  private handleBlur;
423
419
  private handleChange;
424
420
  private handleFocus;
425
- private handleHostInvalid;
426
421
  private handleClearClick;
427
422
  private handleColorPickerChange;
428
423
  private handleColorPickerInput;
@@ -1,9 +1,9 @@
1
- import { Localize } from "./utilities/localize.js";
2
1
  import { t as __decorate } from "./decorate-DcF3lt7P.js";
3
- import "./button-gg3JJxQZ.js";
2
+ import { Localize } from "./utilities/localize.js";
3
+ import "./button-BbabhtKj.js";
4
4
  import "./components/copy/copy.js";
5
- import "./slider-B90Il7x3.js";
6
- import "./text-field-Cznb4Afc.js";
5
+ import "./slider-DY-GuC8T.js";
6
+ import "./text-field-gX5RovkE.js";
7
7
  import { css, html } from "lit";
8
8
  import { property, query, state } from "lit/decorators.js";
9
9
  import hostStyles from "@mcp-b/wc-support/styles/host.styles";
@@ -717,11 +717,15 @@ var SigveloColorPicker = class extends SigveloElement {
717
717
  super.connectedCallback();
718
718
  this.addEventListener("focusin", this.handleFocusIn);
719
719
  this.addEventListener("focusout", this.handleFocusOut);
720
+ this.draggableThumb?.toggle(!this.disabled);
720
721
  }
721
722
  disconnectedCallback() {
722
723
  super.disconnectedCallback();
723
724
  this.removeEventListener("focusin", this.handleFocusIn);
724
725
  this.removeEventListener("focusout", this.handleFocusOut);
726
+ this.draggableThumb?.stop();
727
+ this.isDragging = false;
728
+ this.valueWhenDraggingStarted = void 0;
725
729
  }
726
730
  firstUpdated() {
727
731
  this.setColorFromString(this.value);
@@ -1,6 +1,6 @@
1
- import { Localize } from "./utilities/localize.js";
2
1
  import "./icon-Df0H7LYB.js";
3
2
  import { t as __decorate } from "./decorate-DcF3lt7P.js";
3
+ import { Localize } from "./utilities/localize.js";
4
4
  import "./combobox-item-yM6tDrGG.js";
5
5
  import { css, html } from "lit";
6
6
  import { property, query, state } from "lit/decorators.js";
@@ -110,9 +110,8 @@ var combobox_styles_default = css`
110
110
 
111
111
  /* Focus styles */
112
112
  :not(:host([variant="unstyled"])) #visual-box:has(#text-box:focus-visible) {
113
- outline: var(--sigvelo-border-style) calc(var(--sigvelo-border-width) + 1px)
114
- var(--sigvelo-color-focus);
115
- outline-offset: calc(-1 * var(--sigvelo-border-width));
113
+ outline: var(--sigvelo-focus-ring);
114
+ outline-offset: calc(-1 * var(--sigvelo-focus-width));
116
115
  }
117
116
 
118
117
  /* Input area - single flex container for all content */
@@ -1001,7 +1000,7 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1001
1000
  this.dispatchEvent(new SigveloBlurEvent());
1002
1001
  };
1003
1002
  this.handleKeyDown = (event) => {
1004
- if (this.disabled) return;
1003
+ if (this.effectiveDisabled) return;
1005
1004
  if (event.key === "Backspace" && !this.inputValue && this.multiple && this.selectedItems.length > 0) {
1006
1005
  const lastItem = this.selectedItems[this.selectedItems.length - 1];
1007
1006
  this.deselectItem(lastItem);
@@ -1050,7 +1049,7 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1050
1049
  if (event.key === "Escape") this.open = false;
1051
1050
  };
1052
1051
  this.handleVisualBoxClick = (event) => {
1053
- if (this.disabled) return;
1052
+ if (this.effectiveDisabled) return;
1054
1053
  const target = event.target;
1055
1054
  if (target.closest("#clear-button") || target.closest(".tag-remove")) return;
1056
1055
  event.stopPropagation();
@@ -1083,7 +1082,7 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1083
1082
  };
1084
1083
  this.handleItemPointerMove = (event) => {
1085
1084
  const hoveredItem = event.target.closest("sigvelo-combobox-item");
1086
- if (!hoveredItem || this.disabled) return;
1085
+ if (!hoveredItem || this.effectiveDisabled) return;
1087
1086
  if (hoveredItem !== this.activeItem) {
1088
1087
  if (this.activeItem) {
1089
1088
  this.activeItem.active = false;
@@ -1091,9 +1090,6 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1091
1090
  }
1092
1091
  }
1093
1092
  };
1094
- this.handleHostInvalid = () => {
1095
- this.wasSubmitted = true;
1096
- };
1097
1093
  }
1098
1094
  static {
1099
1095
  this.formAssociated = true;
@@ -1111,13 +1107,8 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1111
1107
  get focusableAnchor() {
1112
1108
  return this.textBox;
1113
1109
  }
1114
- connectedCallback() {
1115
- super.connectedCallback();
1116
- this.addEventListener("invalid", this.handleHostInvalid);
1117
- }
1118
1110
  disconnectedCallback() {
1119
1111
  super.disconnectedCallback();
1120
- this.removeEventListener("invalid", this.handleHostInvalid);
1121
1112
  this.cleanup?.();
1122
1113
  this.clearAnnouncementTimers();
1123
1114
  }
@@ -1138,14 +1129,7 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1138
1129
  this.updateFormValue();
1139
1130
  this.customStates.set("blank", this.isBlank());
1140
1131
  }
1141
- if (changedProperties.has("disabled")) this.customStates.set("disabled", this.disabled);
1142
- if (this.hadUserInteraction || this.wasSubmitted) {
1143
- this.customStates.set("user-invalid", this.isInvalid);
1144
- this.customStates.set("user-valid", !this.isInvalid);
1145
- } else {
1146
- this.customStates.set("user-invalid", false);
1147
- this.customStates.set("user-valid", false);
1148
- }
1132
+ if (changedProperties.has("disabled")) this.customStates.set("disabled", this.effectiveDisabled);
1149
1133
  if (changedProperties.has("multiple")) {
1150
1134
  this.value = this.multiple ? [] : "";
1151
1135
  this.selectedItems = [];
@@ -1153,9 +1137,6 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1153
1137
  }
1154
1138
  if (changedProperties.has("inputValue")) this.updateInputWidth();
1155
1139
  }
1156
- formDisabledCallback(disabled) {
1157
- this.disabled = disabled;
1158
- }
1159
1140
  formResetCallback() {
1160
1141
  const initiallySelectedItems = this.getItems(true).filter((item) => item.hasAttribute("selected"));
1161
1142
  this.getItems(true).forEach((item) => {
@@ -1169,9 +1150,7 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1169
1150
  this.selectedItems = initiallySelectedItems.length > 0 ? [initiallySelectedItems[0]] : [];
1170
1151
  this.inputValue = initiallySelectedItems.length > 0 ? initiallySelectedItems[0].getLabelText() : "";
1171
1152
  }
1172
- this.hadUserInteraction = false;
1173
- this.wasSubmitted = false;
1174
- this.isInvalid = false;
1153
+ super.formResetCallback();
1175
1154
  this.updateFormValue();
1176
1155
  }
1177
1156
  /** Gets all <sigvelo-combobox-item> elements that aren't disabled (by default). */
@@ -1534,9 +1513,9 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1534
1513
  lg: this.size === "lg",
1535
1514
  xl: this.size === "xl",
1536
1515
  pill: this.pill,
1537
- disabled: this.disabled,
1516
+ disabled: this.effectiveDisabled,
1538
1517
  multiple: this.multiple,
1539
- "has-clear": this.withClear && !this.isBlank() && !this.disabled,
1518
+ "has-clear": this.withClear && !this.isBlank() && !this.effectiveDisabled,
1540
1519
  "has-start": hasStart,
1541
1520
  "has-end": hasEnd
1542
1521
  })}
@@ -1576,7 +1555,7 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1576
1555
  aria-controls="dropdown"
1577
1556
  aria-describedby=${ariaDescribedBy}
1578
1557
  aria-invalid=${this.isInvalid ? "true" : "false"}
1579
- ?disabled=${this.disabled}
1558
+ ?disabled=${this.effectiveDisabled}
1580
1559
  ?required=${this.required}
1581
1560
  placeholder=${ifDefined(this.placeholder)}
1582
1561
  .value=${this.inputValue}
@@ -1590,7 +1569,7 @@ var SigveloCombobox = class extends SigveloFormControlElement {
1590
1569
  />
1591
1570
  </div>
1592
1571
 
1593
- ${this.withClear && !this.isBlank() && !this.disabled ? html`
1572
+ ${this.withClear && !this.isBlank() && !this.effectiveDisabled ? html`
1594
1573
  <button
1595
1574
  id="clear-button"
1596
1575
  part="clear-button"
@@ -562,9 +562,9 @@ declare class SigveloCombobox extends SigveloFormControlElement {
562
562
  private selectedItems;
563
563
  private filteredItems;
564
564
  private inputWidth;
565
- private isInvalid;
566
- private hadUserInteraction;
567
- private wasSubmitted;
565
+ protected isInvalid: boolean;
566
+ protected hadUserInteraction: boolean;
567
+ protected wasSubmitted: boolean;
568
568
  private liveAnnouncement;
569
569
  /** The combobox's label. */
570
570
  label: string;
@@ -598,11 +598,9 @@ declare class SigveloCombobox extends SigveloFormControlElement {
598
598
  offset: number;
599
599
  /** The form to associate with. */
600
600
  form: string;
601
- connectedCallback(): void;
602
601
  disconnectedCallback(): void;
603
602
  firstUpdated(): void;
604
603
  updated(changedProperties: PropertyValues<this>): void;
605
- formDisabledCallback(disabled: boolean): void;
606
604
  formResetCallback(): void;
607
605
  /** Gets all <sigvelo-combobox-item> elements that aren't disabled (by default). */
608
606
  private getItems;
@@ -639,7 +637,6 @@ declare class SigveloCombobox extends SigveloFormControlElement {
639
637
  private handleSlotChange;
640
638
  private handleItemClick;
641
639
  private handleItemPointerMove;
642
- private handleHostInvalid;
643
640
  /**
644
641
  * A custom function for rendering tag content. By default, this function returns the item's full `textContent`. You
645
642
  * can override it to customize the content that gets rendered in tags in `multiple` mode.
@@ -116,6 +116,7 @@ declare class SigveloComparison extends SigveloElement {
116
116
  orientation: "horizontal" | "vertical";
117
117
  /** Disables the comparison component, preventing it from being focused and adjusted. */
118
118
  disabled: boolean;
119
+ connectedCallback(): void;
119
120
  firstUpdated(): void;
120
121
  updated(changedProperties: PropertyValues<this>): void;
121
122
  disconnectedCallback(): void;
@@ -1,6 +1,6 @@
1
- import { Localize } from "./utilities/localize.js";
2
1
  import "./icon-Df0H7LYB.js";
3
2
  import { t as __decorate } from "./decorate-DcF3lt7P.js";
3
+ import { Localize } from "./utilities/localize.js";
4
4
  import { css, html } from "lit";
5
5
  import { property, query, state } from "lit/decorators.js";
6
6
  import hostStyles from "@mcp-b/wc-support/styles/host.styles";
@@ -294,6 +294,10 @@ var SigveloComparison = class extends SigveloElement {
294
294
  static {
295
295
  this.styles = [hostStyles, comparison_styles_default];
296
296
  }
297
+ connectedCallback() {
298
+ super.connectedCallback();
299
+ if (this.hasUpdated) this.setupDragging();
300
+ }
297
301
  firstUpdated() {
298
302
  this.setupDragging();
299
303
  }
@@ -309,6 +313,8 @@ var SigveloComparison = class extends SigveloElement {
309
313
  disconnectedCallback() {
310
314
  super.disconnectedCallback();
311
315
  this.dragHandler?.stop();
316
+ this.divider?.classList.remove("dragging");
317
+ this.customStates.set("dragging", false);
312
318
  }
313
319
  handleFocus() {
314
320
  this.customStates.set("focused", true);
@@ -351,7 +357,9 @@ var SigveloComparison = class extends SigveloElement {
351
357
  }
352
358
  setupDragging() {
353
359
  this.dragHandler?.stop();
354
- if (this.disabled) return;
360
+ this.divider?.classList.remove("dragging");
361
+ this.customStates.set("dragging", false);
362
+ if (this.disabled || !this.isConnected) return;
355
363
  this.dragHandler = new DraggableElement(this.divider, {
356
364
  start: (clientX, clientY) => {
357
365
  this.divider.classList.add("dragging");
@@ -376,7 +384,7 @@ var SigveloComparison = class extends SigveloElement {
376
384
  }
377
385
  },
378
386
  stop: () => {
379
- this.divider.classList.remove("dragging");
387
+ this.divider?.classList.remove("dragging");
380
388
  this.customStates.set("dragging", false);
381
389
  }
382
390
  });
@@ -1,2 +1,2 @@
1
- import { t as SigveloAlertDialog } from "../../alert-dialog-D25Oi_TS.js";
1
+ import { t as SigveloAlertDialog } from "../../alert-dialog-CGUwj_0U.js";
2
2
  export { SigveloAlertDialog };
@@ -1,2 +1,2 @@
1
- import { t as SigveloButton } from "../../button-BQofnUt4.js";
1
+ import { t as SigveloButton } from "../../button-c5YKsC69.js";
2
2
  export { SigveloButton };
@@ -1,2 +1,2 @@
1
- import { t as SigveloButton } from "../../button-gg3JJxQZ.js";
1
+ import { t as SigveloButton } from "../../button-BbabhtKj.js";
2
2
  export { SigveloButton };
@@ -1,2 +1,2 @@
1
- import { t as SigveloCarousel } from "../../carousel-XopKISBQ.js";
1
+ import { t as SigveloCarousel } from "../../carousel-DpIqPTuO.js";
2
2
  export { SigveloCarousel };
@@ -1,2 +1,2 @@
1
- import { t as SigveloCheckbox } from "../../checkbox-DoFcDEKB.js";
1
+ import { t as SigveloCheckbox } from "../../checkbox-BtoypUxD.js";
2
2
  export { SigveloCheckbox };
@@ -1,2 +1,2 @@
1
- import { t as SigveloCheckbox } from "../../checkbox-C96lUDIM.js";
1
+ import { t as SigveloCheckbox } from "../../checkbox-C97tlcf2.js";
2
2
  export { SigveloCheckbox };
@@ -1,2 +1,2 @@
1
- import { t as SigveloColorInput } from "../../color-input-Bky89xg_.js";
1
+ import { t as SigveloColorInput } from "../../color-input-S29ZHwHE.js";
2
2
  export { SigveloColorInput };
@@ -1,2 +1,2 @@
1
- import { t as SigveloColorInput } from "../../color-input-Gae_-9w-.js";
1
+ import { t as SigveloColorInput } from "../../color-input-Dtp1v7A-.js";
2
2
  export { SigveloColorInput };
@@ -1,2 +1,2 @@
1
- import { t as SigveloColorPicker } from "../../color-picker-BYyZavkT.js";
1
+ import { t as SigveloColorPicker } from "../../color-picker-Mnpc5u6E.js";
2
2
  export { SigveloColorPicker };
@@ -1,2 +1,2 @@
1
- import { n as SigveloCombobox } from "../../combobox-item-D2H1CMxC.js";
1
+ import { n as SigveloCombobox } from "../../combobox-item-BnBtZyhw.js";
2
2
  export { SigveloCombobox };
@@ -1,2 +1,2 @@
1
- import { t as SigveloCombobox } from "../../combobox-iERnTD3A.js";
1
+ import { t as SigveloCombobox } from "../../combobox-D4ji7M2B.js";
2
2
  export { SigveloCombobox };
@@ -1,2 +1,2 @@
1
- import { t as SigveloComboboxItem } from "../../combobox-item-D2H1CMxC.js";
1
+ import { t as SigveloComboboxItem } from "../../combobox-item-BnBtZyhw.js";
2
2
  export { SigveloComboboxItem };
@@ -1,2 +1,2 @@
1
- import { t as SigveloComparison } from "../../comparison-B1-nMwmp.js";
1
+ import { t as SigveloComparison } from "../../comparison-CRvbwS7X.js";
2
2
  export { SigveloComparison };
@@ -1,2 +1,2 @@
1
- import { t as SigveloComparison } from "../../comparison-HJ1Zedhs.js";
1
+ import { t as SigveloComparison } from "../../comparison-DQUpvkmg.js";
2
2
  export { SigveloComparison };
@@ -1,14 +1,13 @@
1
- import { Localize } from "../../utilities/localize.js";
2
1
  import "../../icon-Df0H7LYB.js";
3
2
  import { t as __decorate } from "../../decorate-DcF3lt7P.js";
4
- import "../../button-gg3JJxQZ.js";
3
+ import { Localize } from "../../utilities/localize.js";
4
+ import "../../button-BbabhtKj.js";
5
+ import { showCopyFeedback } from "../../utilities/copy-feedback.js";
5
6
  import { t as copy_styles_default } from "../../copy.styles-DWGvGNTP.js";
6
7
  import { html } from "lit";
7
8
  import { property, query } from "lit/decorators.js";
8
9
  import hostStyles from "@mcp-b/wc-support/styles/host.styles";
9
10
  import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
10
- import { animateWithClass } from "@mcp-b/wc-support/utilities/animate";
11
- import { computePosition, flip } from "@floating-ui/dom";
12
11
  import { SigveloCopyErrorEvent, SigveloCopyEvent } from "@mcp-b/wc-support/events/copy";
13
12
  //#region src/components/copy/copy.ts
14
13
  /**
@@ -229,22 +228,7 @@ var SigveloCopy = class extends SigveloElement {
229
228
  }
230
229
  /** Shows copy feedback with an animation */
231
230
  async showFeedback(message) {
232
- if (this.feedbackPlacement === "hidden") return;
233
- this.feedback.textContent = message;
234
- this.feedback.hidden = false;
235
- this.feedback.showPopover();
236
- computePosition(this, this.feedback, {
237
- placement: this.feedbackPlacement,
238
- middleware: [flip()]
239
- }).then(({ x, y }) => {
240
- Object.assign(this.feedback.style, {
241
- left: `${x}px`,
242
- top: `${y}px`
243
- });
244
- });
245
- await animateWithClass(this.feedback, "show");
246
- this.feedback.hidden = true;
247
- this.feedback.hidePopover();
231
+ await showCopyFeedback(this, this.feedback, message, this.feedbackPlacement);
248
232
  }
249
233
  render() {
250
234
  return html`
@@ -1,2 +1,2 @@
1
- import { t as SigveloDate } from "../../date-6M6wfa8L.js";
1
+ import { t as SigveloDate } from "../../date-DtaTBM71.js";
2
2
  export { SigveloDate };