@baloise/ds-core 19.9.4 → 19.9.5

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 (150) hide show
  1. package/components/bal-checkbox-group.js +20 -2
  2. package/components/bal-checkbox2.js +21 -4
  3. package/components/bal-nav.js +64 -52
  4. package/components/bal-select2.js +22 -10
  5. package/components/bal-switch.js +1 -74
  6. package/{dist/esm/bal-switch.entry.js → components/bal-switch2.js} +36 -8
  7. package/components/bal-tabs2.js +28 -16
  8. package/components/index.js +1 -1
  9. package/components/tokens.esm.js +1 -1
  10. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  11. package/dist/baloise-design-system/index.esm.js +1 -1
  12. package/dist/baloise-design-system/{p-4f036f58ab.entry.js → p-1bb5b8696e.entry.js} +1 -1
  13. package/dist/baloise-design-system/p-1d7406989c.system.entry.js +1 -0
  14. package/dist/baloise-design-system/{p-484747871b.entry.js → p-3850595dd0.entry.js} +1 -1
  15. package/dist/baloise-design-system/{p-813c277b9f.system.entry.js → p-43dd693355.system.entry.js} +1 -1
  16. package/dist/baloise-design-system/{p-72b37feadf.entry.js → p-477359bbf9.entry.js} +1 -1
  17. package/dist/baloise-design-system/{p-c900ad58d0.system.entry.js → p-59129fb1d1.system.entry.js} +1 -1
  18. package/dist/baloise-design-system/{p-j8ENYrr7.js → p-5GEK9UQy.js} +1 -1
  19. package/dist/baloise-design-system/{p-372ba2be28.system.entry.js → p-607125007c.system.entry.js} +1 -1
  20. package/dist/baloise-design-system/{p-1d8afd6f97.system.entry.js → p-64d45da025.system.entry.js} +1 -1
  21. package/dist/baloise-design-system/{p-6d9619c9d0.system.entry.js → p-68baccfba9.system.entry.js} +1 -1
  22. package/dist/baloise-design-system/{p-29d68d2132.entry.js → p-68f77714ab.entry.js} +1 -1
  23. package/dist/baloise-design-system/{p-9bf6adbd21.system.entry.js → p-6c3d087d59.system.entry.js} +1 -1
  24. package/dist/baloise-design-system/{p-627def5e99.entry.js → p-74fe27789f.entry.js} +1 -1
  25. package/dist/baloise-design-system/{p-52c76f1bdd.entry.js → p-8268d61dd6.entry.js} +1 -1
  26. package/dist/baloise-design-system/{p-e7a78b097d.entry.js → p-8e3412d465.entry.js} +1 -1
  27. package/dist/baloise-design-system/p-BFRjY4w3.js +1 -1
  28. package/dist/baloise-design-system/p-BRAmUyPx.system.js +1 -1
  29. package/dist/baloise-design-system/p-Bk7UdnZ5.system.js +1 -1
  30. package/dist/baloise-design-system/p-CPHPFMUC.system.js +1 -0
  31. package/dist/baloise-design-system/{p-BhPUGxAx.system.js → p-DLLNm5Gs.system.js} +1 -1
  32. package/dist/baloise-design-system/p-DvLv1IDC.js +1 -0
  33. package/dist/baloise-design-system/{p-CM1lc2ni.system.js → p-DxnFuP0T.system.js} +1 -1
  34. package/dist/baloise-design-system/{p-CwRoS0HB.js → p-Oz8SBVmc.js} +1 -1
  35. package/dist/baloise-design-system/{p-CviYHi5s.system.js → p-aDM_iThE.system.js} +1 -1
  36. package/dist/baloise-design-system/{p-af292102b8.entry.js → p-af05694fd5.entry.js} +1 -1
  37. package/dist/baloise-design-system/{p-3bb89f6a82.entry.js → p-b670d9cae9.entry.js} +1 -1
  38. package/dist/baloise-design-system/{p-46986c305d.system.entry.js → p-b6e82651ef.system.entry.js} +1 -1
  39. package/dist/baloise-design-system/{p-50a9cbd963.entry.js → p-bac3d30df3.entry.js} +1 -1
  40. package/dist/baloise-design-system/{p-a0020dcf30.system.entry.js → p-bbeeefc31a.system.entry.js} +1 -1
  41. package/dist/baloise-design-system/{p-495621ad03.entry.js → p-c31dc8146b.entry.js} +1 -1
  42. package/dist/baloise-design-system/{p-ff649f9b8a.system.entry.js → p-c4a244b558.system.entry.js} +1 -1
  43. package/dist/baloise-design-system/{p-9871800426.entry.js → p-c5ae87f18e.entry.js} +1 -1
  44. package/dist/baloise-design-system/{p-3c2762a456.entry.js → p-c8b853074f.entry.js} +1 -1
  45. package/dist/baloise-design-system/{p-ccdbef8f33.system.entry.js → p-d21134a60b.system.entry.js} +1 -1
  46. package/dist/baloise-design-system/{p-8f06689f6a.system.entry.js → p-d5bd821ab7.system.entry.js} +1 -1
  47. package/dist/baloise-design-system/p-d9349f5eb0.entry.js +1 -0
  48. package/dist/baloise-design-system/{p-d5de84380b.entry.js → p-e6f03ecdd0.entry.js} +1 -1
  49. package/dist/baloise-design-system/{p-353111ebe0.system.entry.js → p-eb2f5b22de.system.entry.js} +1 -1
  50. package/dist/baloise-design-system/{p-608249b400.system.entry.js → p-f2435a528c.system.entry.js} +1 -1
  51. package/dist/baloise-design-system/{p-47a709940f.system.entry.js → p-fa728470a3.system.entry.js} +1 -1
  52. package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
  53. package/dist/cjs/{bal-dropdown_3.cjs.entry.js → bal-check_7.cjs.entry.js} +815 -9
  54. package/dist/cjs/bal-field_5.cjs.entry.js +3 -3
  55. package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
  56. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  57. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  58. package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
  59. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  60. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  61. package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
  62. package/dist/cjs/{bal-radio_2.cjs.entry.js → bal-radio_3.cjs.entry.js} +50 -0
  63. package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
  64. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  65. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  66. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  67. package/dist/cjs/baloise-design-system.cjs.js +1 -1
  68. package/dist/cjs/{breakpoints.decorator-DIeNdkiK.js → breakpoints.decorator-DPrGtqtk.js} +1 -1
  69. package/dist/cjs/{breakpoints.subject-YppJaklV.js → breakpoints.subject-C1p-ePFH.js} +1 -1
  70. package/dist/cjs/index.cjs.js +2 -2
  71. package/dist/cjs/initialize-BzrcZo6Y.js +1 -1
  72. package/dist/cjs/loader.cjs.js +1 -1
  73. package/dist/cjs/{tokens.esm-CGjXTIYw.js → tokens.esm-BWWYqtq4.js} +1 -1
  74. package/dist/cjs/{window-resize.decorator-CnkxxD9I.js → window-resize.decorator-DRN0wiUR.js} +1 -1
  75. package/dist/collection/collection-manifest.json +14 -15
  76. package/dist/collection/components/bal-checkbox/bal-checkbox.js +2 -3
  77. package/dist/collection/utils/constants/version.constant.js +1 -1
  78. package/dist/esm/bal-carousel_2.entry.js +3 -3
  79. package/dist/esm/{bal-dropdown_3.entry.js → bal-check_7.entry.js} +815 -13
  80. package/dist/esm/bal-field_5.entry.js +3 -3
  81. package/dist/esm/bal-hint_5.entry.js +3 -3
  82. package/dist/esm/bal-list_8.entry.js +3 -3
  83. package/dist/esm/bal-logo.entry.js +3 -3
  84. package/dist/esm/bal-nav_8.entry.js +3 -3
  85. package/dist/esm/bal-navbar_5.entry.js +3 -3
  86. package/dist/esm/bal-pagination.entry.js +3 -3
  87. package/dist/esm/bal-progress-bar.entry.js +4 -4
  88. package/dist/esm/{bal-radio_2.entry.js → bal-radio_3.entry.js} +50 -1
  89. package/dist/esm/bal-segment_2.entry.js +4 -4
  90. package/dist/esm/bal-shape.entry.js +1 -1
  91. package/dist/esm/bal-steps.entry.js +3 -3
  92. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  93. package/dist/esm/baloise-design-system.js +1 -1
  94. package/dist/esm/{breakpoints.decorator-CLJL1mrw.js → breakpoints.decorator-DwhK_t2m.js} +1 -1
  95. package/dist/esm/{breakpoints.subject-CaVH5CdH.js → breakpoints.subject-PxavGndB.js} +1 -1
  96. package/dist/esm/index.js +3 -3
  97. package/dist/esm/initialize-W3od-FM9.js +1 -1
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/esm/{tokens.esm-PSBwy3yf.js → tokens.esm-Dk6PruGq.js} +1 -1
  100. package/dist/esm/{window-resize.decorator-B6C5v87J.js → window-resize.decorator-DiNYHJee.js} +1 -1
  101. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  102. package/dist/esm-es5/bal-check_7.entry.js +1 -0
  103. package/dist/esm-es5/bal-field_5.entry.js +1 -1
  104. package/dist/esm-es5/bal-hint_5.entry.js +1 -1
  105. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  106. package/dist/esm-es5/bal-logo.entry.js +1 -1
  107. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  108. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  109. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  110. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  111. package/dist/esm-es5/{bal-radio_2.entry.js → bal-radio_3.entry.js} +1 -1
  112. package/dist/esm-es5/bal-segment_2.entry.js +1 -1
  113. package/dist/esm-es5/bal-shape.entry.js +1 -1
  114. package/dist/esm-es5/bal-steps.entry.js +1 -1
  115. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  116. package/dist/esm-es5/baloise-design-system.js +1 -1
  117. package/dist/esm-es5/{breakpoints.decorator-CLJL1mrw.js → breakpoints.decorator-DwhK_t2m.js} +1 -1
  118. package/dist/esm-es5/{breakpoints.subject-CaVH5CdH.js → breakpoints.subject-PxavGndB.js} +1 -1
  119. package/dist/esm-es5/index.js +1 -1
  120. package/dist/esm-es5/initialize-W3od-FM9.js +1 -1
  121. package/dist/esm-es5/loader.js +1 -1
  122. package/dist/esm-es5/{window-resize.decorator-B6C5v87J.js → window-resize.decorator-DiNYHJee.js} +1 -1
  123. package/package.json +6 -6
  124. package/dist/baloise-design-system/p-00d493e589.system.entry.js +0 -1
  125. package/dist/baloise-design-system/p-24185181f1.system.entry.js +0 -1
  126. package/dist/baloise-design-system/p-2dbbdfb785.system.entry.js +0 -1
  127. package/dist/baloise-design-system/p-5965694a0f.entry.js +0 -1
  128. package/dist/baloise-design-system/p-75f3abf19e.system.entry.js +0 -1
  129. package/dist/baloise-design-system/p-90d225c57c.system.entry.js +0 -1
  130. package/dist/baloise-design-system/p-B6GTvSSK.js +0 -1
  131. package/dist/baloise-design-system/p-DwxDqMbM.system.js +0 -1
  132. package/dist/baloise-design-system/p-a97c5309f7.entry.js +0 -1
  133. package/dist/baloise-design-system/p-f217ad88a9.entry.js +0 -1
  134. package/dist/baloise-design-system/p-f7b16f08ab.entry.js +0 -1
  135. package/dist/baloise-design-system/p-fc9a46b295.entry.js +0 -1
  136. package/dist/cjs/bal-check.cjs.entry.js +0 -55
  137. package/dist/cjs/bal-checkbox_2.cjs.entry.js +0 -734
  138. package/dist/cjs/bal-radio-icon.cjs.entry.js +0 -55
  139. package/dist/cjs/bal-switch.cjs.entry.js +0 -50
  140. package/dist/esm/bal-check.entry.js +0 -53
  141. package/dist/esm/bal-checkbox_2.entry.js +0 -731
  142. package/dist/esm/bal-radio-icon.entry.js +0 -53
  143. package/dist/esm-es5/bal-check.entry.js +0 -1
  144. package/dist/esm-es5/bal-checkbox_2.entry.js +0 -1
  145. package/dist/esm-es5/bal-dropdown_3.entry.js +0 -1
  146. package/dist/esm-es5/bal-radio-icon.entry.js +0 -1
  147. package/dist/esm-es5/bal-switch.entry.js +0 -1
  148. /package/dist/baloise-design-system/{p-PSBwy3yf.js → p-Dk6PruGq.js} +0 -0
  149. /package/dist/baloise-design-system/{p-BJHY1rVR.system.js → p-Nqmo3uHl.system.js} +0 -0
  150. /package/dist/esm-es5/{tokens.esm-PSBwy3yf.js → tokens.esm-Dk6PruGq.js} +0 -0
@@ -8,7 +8,10 @@ import { d as defaultBalAriaForm } from './form.js';
8
8
  import { s as stopEventBubbling } from './form-input.js';
9
9
  import { i as isDescendant, o as hasTagName } from './helpers.js';
10
10
  import { L as Logger } from './log.js';
11
- import { d as defineCustomElement$2 } from './bal-checkbox2.js';
11
+ import { d as defineCustomElement$5 } from './bal-check2.js';
12
+ import { d as defineCustomElement$4 } from './bal-checkbox2.js';
13
+ import { d as defineCustomElement$3 } from './bal-icon2.js';
14
+ import { d as defineCustomElement$2 } from './bal-switch2.js';
12
15
  import { L as ListenToFocus } from './focus.decorator.js';
13
16
  import { L as ListenToMutation } from './mutation.decorator.js';
14
17
 
@@ -392,14 +395,29 @@ function defineCustomElement$1() {
392
395
  if (typeof customElements === "undefined") {
393
396
  return;
394
397
  }
395
- const components = ["bal-checkbox-group", "bal-checkbox"];
398
+ const components = ["bal-checkbox-group", "bal-check", "bal-checkbox", "bal-icon", "bal-switch"];
396
399
  components.forEach(tagName => { switch (tagName) {
397
400
  case "bal-checkbox-group":
398
401
  if (!customElements.get(tagName)) {
399
402
  customElements.define(tagName, CheckboxGroup);
400
403
  }
401
404
  break;
405
+ case "bal-check":
406
+ if (!customElements.get(tagName)) {
407
+ defineCustomElement$5();
408
+ }
409
+ break;
402
410
  case "bal-checkbox":
411
+ if (!customElements.get(tagName)) {
412
+ defineCustomElement$4();
413
+ }
414
+ break;
415
+ case "bal-icon":
416
+ if (!customElements.get(tagName)) {
417
+ defineCustomElement$3();
418
+ }
419
+ break;
420
+ case "bal-switch":
403
421
  if (!customElements.get(tagName)) {
404
422
  defineCustomElement$2();
405
423
  }
@@ -8,6 +8,9 @@ import { d as defaultBalAriaForm } from './form.js';
8
8
  import { s as stopEventBubbling, i as inputSetFocus, a as inputSetBlur } from './form-input.js';
9
9
  import { i as isDescendant } from './helpers.js';
10
10
  import { L as Logger } from './log.js';
11
+ import { d as defineCustomElement$3 } from './bal-check2.js';
12
+ import { d as defineCustomElement$2 } from './bal-icon2.js';
13
+ import { d as defineCustomElement$1 } from './bal-switch2.js';
11
14
  import { L as ListenToElementStates } from './element-states.decorator.js';
12
15
  import { a as isSpaceKey } from './keyboard.helpers.js';
13
16
 
@@ -349,12 +352,11 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
349
352
  const id = this.ariaForm.controlId || this.inputId;
350
353
  const labelId = this.ariaForm.labelId || null;
351
354
  const LabelTag = hasFormControl ? 'label' : 'span';
352
- const Icon = this.interface === 'switch' ? 'bal-switch' : 'bal-check';
353
- return (h(Host, { key: 'eaa9cf2ba9de2a203b98515939ff117c89dc16cf', "aria-checked": `${this.checked}`, "aria-disabled": ariaBooleanToString(this.disabled), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-hidden": ariaBooleanToString(this.disabled || this.nonSubmit), "aria-focused": focused ? 'true' : null, "aria-labelledby": labelId, "aria-describedby": this.ariaForm.messageId, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ 'bal-focused': focused }, block.class()), block.modifier('checkbox').class()), block.modifier('button').class(this.interface === 'button')), block.modifier('switch').class(this.interface === 'switch')), block.modifier('tile').class(this.interface === 'tile')), block.modifier(`tile-color-${this.color}`).class(this.interface === 'tile' && !!this.color)), block.modifier('focused').class(this.focused)), block.modifier('invalid').class(this.invalid)), block.modifier('checked').class(this.checked)), block.modifier('flat').class(this.flat)), block.modifier('disabled').class(this.disabled || this.readonly)), block.modifier('hovered').class(this.mergedElementState.hovered)), block.modifier('pressed').class(this.mergedElementState.pressed)), block.modifier(`column-${this.colSize}`).class(this.interface === 'tile' && this.colSize > 1)), block
355
+ return (h(Host, { key: 'e6718d0f01496940fbc03686159599af02e63be2', "aria-checked": `${this.checked}`, "aria-disabled": ariaBooleanToString(this.disabled), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-hidden": ariaBooleanToString(this.disabled || this.nonSubmit), "aria-focused": focused ? 'true' : null, "aria-labelledby": labelId, "aria-describedby": this.ariaForm.messageId, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ 'bal-focused': focused }, block.class()), block.modifier('checkbox').class()), block.modifier('button').class(this.interface === 'button')), block.modifier('switch').class(this.interface === 'switch')), block.modifier('tile').class(this.interface === 'tile')), block.modifier(`tile-color-${this.color}`).class(this.interface === 'tile' && !!this.color)), block.modifier('focused').class(this.focused)), block.modifier('invalid').class(this.invalid)), block.modifier('checked').class(this.checked)), block.modifier('flat').class(this.flat)), block.modifier('disabled').class(this.disabled || this.readonly)), block.modifier('hovered').class(this.mergedElementState.hovered)), block.modifier('pressed').class(this.mergedElementState.pressed)), block.modifier(`column-${this.colSize}`).class(this.interface === 'tile' && this.colSize > 1)), block
354
356
  .modifier(`column-tablet-${this.colSizeTablet}`)
355
357
  .class(this.interface === 'tile' && this.colSizeTablet > 1)), block
356
358
  .modifier(`column-mobile-${this.colSizeMobile}`)
357
- .class(this.interface === 'tile' && this.colSizeMobile > 1)), onClick: this.onClick }, h(LabelTag, { key: '6fd849f4768bc7155eb5db297713bc82aeab6dfe', class: Object.assign({}, labelEl.class()), "data-testid": "bal-checkbox-label" }, hasFormControl ? (h("input", Object.assign({ id: id, type: "checkbox", "data-testid": "bal-checkbox-input", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled || this.nonSubmit, readonly: this.readonly, class: Object.assign({}, inputEl.class()), "aria-hidden": ariaBooleanToString(this.nonSubmit), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-describedby": this.ariaForm.messageId, onChange: ev => this.toggleChecked(ev), onFocus: ev => this.onFocus(ev), onBlur: ev => this.onBlur(ev), ref: inputEl => (this.nativeInput = inputEl) }, inputAttributes))) : (''), this.interface !== 'tile' ? (h("div", { class: Object.assign({}, labelIconEl.class()) }, h(Icon, { checked: this.checked, disabled: this.disabled || this.readonly, invalid: this.invalid, inverted: this.interface === 'button' && this.checked, hovered: this.mergedElementState.hovered, pressed: this.mergedElementState.pressed }))) : (''), h("div", { key: 'ca1ec209d9211082db1d0905e599eea5e6803244', class: Object.assign(Object.assign({}, labelTextEl.class()), labelTextEl.modifier('hidden').class(this.labelHidden)) }, h("slot", { key: 'a2a3c8124d7d47bf300b229fe01e62fa198961c0' })))));
359
+ .class(this.interface === 'tile' && this.colSizeMobile > 1)), onClick: this.onClick }, h(LabelTag, { key: '3bd8c2c8217d5e958009aeb3465bd7c8446c6960', class: Object.assign({}, labelEl.class()), "data-testid": "bal-checkbox-label" }, hasFormControl ? (h("input", Object.assign({ id: id, type: "checkbox", "data-testid": "bal-checkbox-input", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled || this.nonSubmit, readonly: this.readonly, class: Object.assign({}, inputEl.class()), "aria-hidden": ariaBooleanToString(this.nonSubmit), "aria-invalid": this.invalid === true ? 'true' : 'false', "aria-describedby": this.ariaForm.messageId, onChange: ev => this.toggleChecked(ev), onFocus: ev => this.onFocus(ev), onBlur: ev => this.onBlur(ev), ref: inputEl => (this.nativeInput = inputEl) }, inputAttributes))) : (''), this.interface !== 'tile' ? (h("div", { class: Object.assign({}, labelIconEl.class()) }, this.interface === 'switch' ? (h("bal-switch", { checked: this.checked, disabled: this.disabled || this.readonly, invalid: this.invalid, hovered: this.mergedElementState.hovered, pressed: this.mergedElementState.pressed })) : (h("bal-check", { checked: this.checked, disabled: this.disabled || this.readonly, invalid: this.invalid, inverted: this.interface === 'button' && this.checked, hovered: this.mergedElementState.hovered, pressed: this.mergedElementState.pressed })))) : (''), h("div", { key: 'c1d1b270f076b748681da1d4fdb36380e8bfaf45', class: Object.assign(Object.assign({}, labelTextEl.class()), labelTextEl.modifier('hidden').class(this.labelHidden)) }, h("slot", { key: '123d7f262307eda399023cdc4ecbe6c83d352336' })))));
358
360
  }
359
361
  get el() { return this; }
360
362
  static get watchers() { return {
@@ -415,13 +417,28 @@ function defineCustomElement() {
415
417
  if (typeof customElements === "undefined") {
416
418
  return;
417
419
  }
418
- const components = ["bal-checkbox"];
420
+ const components = ["bal-checkbox", "bal-check", "bal-icon", "bal-switch"];
419
421
  components.forEach(tagName => { switch (tagName) {
420
422
  case "bal-checkbox":
421
423
  if (!customElements.get(tagName)) {
422
424
  customElements.define(tagName, Checkbox);
423
425
  }
424
426
  break;
427
+ case "bal-check":
428
+ if (!customElements.get(tagName)) {
429
+ defineCustomElement$3();
430
+ }
431
+ break;
432
+ case "bal-icon":
433
+ if (!customElements.get(tagName)) {
434
+ defineCustomElement$2();
435
+ }
436
+ break;
437
+ case "bal-switch":
438
+ if (!customElements.get(tagName)) {
439
+ defineCustomElement$1();
440
+ }
441
+ break;
425
442
  } });
426
443
  }
427
444
 
@@ -8,32 +8,34 @@ import { L as Logger } from './log.js';
8
8
  import { B as BalScrollHandler } from './scroll.js';
9
9
  import { s as sanitizeSvg } from './svg.js';
10
10
  import { e as isTabKey } from './keyboard.helpers.js';
11
- import { d as defineCustomElement$t } from './bal-badge2.js';
12
- import { d as defineCustomElement$s } from './bal-button2.js';
13
- import { d as defineCustomElement$r } from './bal-checkbox2.js';
14
- import { d as defineCustomElement$q } from './bal-close2.js';
15
- import { d as defineCustomElement$p } from './bal-heading2.js';
16
- import { d as defineCustomElement$o } from './bal-icon2.js';
17
- import { d as defineCustomElement$n } from './bal-list2.js';
18
- import { d as defineCustomElement$m } from './bal-list-item2.js';
19
- import { d as defineCustomElement$l } from './bal-list-item-accordion-body2.js';
20
- import { d as defineCustomElement$k } from './bal-list-item-accordion-head2.js';
21
- import { d as defineCustomElement$j } from './bal-list-item-content2.js';
22
- import { d as defineCustomElement$i } from './bal-list-item-icon2.js';
23
- import { d as defineCustomElement$h } from './bal-list-item-title2.js';
24
- import { d as defineCustomElement$g } from './bal-logo2.js';
25
- import { d as defineCustomElement$f } from './bal-nav-link2.js';
26
- import { d as defineCustomElement$e } from './bal-nav-link-grid2.js';
27
- import { d as defineCustomElement$d } from './bal-nav-link-grid-col2.js';
28
- import { d as defineCustomElement$c } from './bal-nav-menu-bar2.js';
29
- import { d as defineCustomElement$b } from './bal-nav-menu-flyout2.js';
30
- import { d as defineCustomElement$a } from './bal-nav-meta-bar2.js';
31
- import { d as defineCustomElement$9 } from './bal-popover2.js';
32
- import { d as defineCustomElement$8 } from './bal-popover-content2.js';
33
- import { d as defineCustomElement$7 } from './bal-select2.js';
34
- import { d as defineCustomElement$6 } from './bal-select-option2.js';
35
- import { d as defineCustomElement$5 } from './bal-spinner2.js';
36
- import { d as defineCustomElement$4 } from './bal-stack2.js';
11
+ import { d as defineCustomElement$v } from './bal-badge2.js';
12
+ import { d as defineCustomElement$u } from './bal-button2.js';
13
+ import { d as defineCustomElement$t } from './bal-check2.js';
14
+ import { d as defineCustomElement$s } from './bal-checkbox2.js';
15
+ import { d as defineCustomElement$r } from './bal-close2.js';
16
+ import { d as defineCustomElement$q } from './bal-heading2.js';
17
+ import { d as defineCustomElement$p } from './bal-icon2.js';
18
+ import { d as defineCustomElement$o } from './bal-list2.js';
19
+ import { d as defineCustomElement$n } from './bal-list-item2.js';
20
+ import { d as defineCustomElement$m } from './bal-list-item-accordion-body2.js';
21
+ import { d as defineCustomElement$l } from './bal-list-item-accordion-head2.js';
22
+ import { d as defineCustomElement$k } from './bal-list-item-content2.js';
23
+ import { d as defineCustomElement$j } from './bal-list-item-icon2.js';
24
+ import { d as defineCustomElement$i } from './bal-list-item-title2.js';
25
+ import { d as defineCustomElement$h } from './bal-logo2.js';
26
+ import { d as defineCustomElement$g } from './bal-nav-link2.js';
27
+ import { d as defineCustomElement$f } from './bal-nav-link-grid2.js';
28
+ import { d as defineCustomElement$e } from './bal-nav-link-grid-col2.js';
29
+ import { d as defineCustomElement$d } from './bal-nav-menu-bar2.js';
30
+ import { d as defineCustomElement$c } from './bal-nav-menu-flyout2.js';
31
+ import { d as defineCustomElement$b } from './bal-nav-meta-bar2.js';
32
+ import { d as defineCustomElement$a } from './bal-popover2.js';
33
+ import { d as defineCustomElement$9 } from './bal-popover-content2.js';
34
+ import { d as defineCustomElement$8 } from './bal-select2.js';
35
+ import { d as defineCustomElement$7 } from './bal-select-option2.js';
36
+ import { d as defineCustomElement$6 } from './bal-spinner2.js';
37
+ import { d as defineCustomElement$5 } from './bal-stack2.js';
38
+ import { d as defineCustomElement$4 } from './bal-switch2.js';
37
39
  import { d as defineCustomElement$3 } from './bal-tabs2.js';
38
40
  import { d as defineCustomElement$2 } from './bal-tag2.js';
39
41
  import { b as balBreakpoints } from './breakpoints.subject.js';
@@ -885,7 +887,7 @@ function defineCustomElement$1() {
885
887
  if (typeof customElements === "undefined") {
886
888
  return;
887
889
  }
888
- const components = ["bal-nav", "bal-badge", "bal-button", "bal-checkbox", "bal-close", "bal-heading", "bal-icon", "bal-list", "bal-list-item", "bal-list-item-accordion-body", "bal-list-item-accordion-head", "bal-list-item-content", "bal-list-item-icon", "bal-list-item-title", "bal-logo", "bal-nav-link", "bal-nav-link-grid", "bal-nav-link-grid-col", "bal-nav-menu-bar", "bal-nav-menu-flyout", "bal-nav-meta-bar", "bal-popover", "bal-popover-content", "bal-select", "bal-select-option", "bal-spinner", "bal-stack", "bal-tabs", "bal-tag"];
890
+ const components = ["bal-nav", "bal-badge", "bal-button", "bal-check", "bal-checkbox", "bal-close", "bal-heading", "bal-icon", "bal-list", "bal-list-item", "bal-list-item-accordion-body", "bal-list-item-accordion-head", "bal-list-item-content", "bal-list-item-icon", "bal-list-item-title", "bal-logo", "bal-nav-link", "bal-nav-link-grid", "bal-nav-link-grid-col", "bal-nav-menu-bar", "bal-nav-menu-flyout", "bal-nav-meta-bar", "bal-popover", "bal-popover-content", "bal-select", "bal-select-option", "bal-spinner", "bal-stack", "bal-switch", "bal-tabs", "bal-tag"];
889
891
  components.forEach(tagName => { switch (tagName) {
890
892
  case "bal-nav":
891
893
  if (!customElements.get(tagName)) {
@@ -894,130 +896,140 @@ function defineCustomElement$1() {
894
896
  break;
895
897
  case "bal-badge":
896
898
  if (!customElements.get(tagName)) {
897
- defineCustomElement$t();
899
+ defineCustomElement$v();
898
900
  }
899
901
  break;
900
902
  case "bal-button":
901
903
  if (!customElements.get(tagName)) {
902
- defineCustomElement$s();
904
+ defineCustomElement$u();
905
+ }
906
+ break;
907
+ case "bal-check":
908
+ if (!customElements.get(tagName)) {
909
+ defineCustomElement$t();
903
910
  }
904
911
  break;
905
912
  case "bal-checkbox":
906
913
  if (!customElements.get(tagName)) {
907
- defineCustomElement$r();
914
+ defineCustomElement$s();
908
915
  }
909
916
  break;
910
917
  case "bal-close":
911
918
  if (!customElements.get(tagName)) {
912
- defineCustomElement$q();
919
+ defineCustomElement$r();
913
920
  }
914
921
  break;
915
922
  case "bal-heading":
916
923
  if (!customElements.get(tagName)) {
917
- defineCustomElement$p();
924
+ defineCustomElement$q();
918
925
  }
919
926
  break;
920
927
  case "bal-icon":
921
928
  if (!customElements.get(tagName)) {
922
- defineCustomElement$o();
929
+ defineCustomElement$p();
923
930
  }
924
931
  break;
925
932
  case "bal-list":
926
933
  if (!customElements.get(tagName)) {
927
- defineCustomElement$n();
934
+ defineCustomElement$o();
928
935
  }
929
936
  break;
930
937
  case "bal-list-item":
931
938
  if (!customElements.get(tagName)) {
932
- defineCustomElement$m();
939
+ defineCustomElement$n();
933
940
  }
934
941
  break;
935
942
  case "bal-list-item-accordion-body":
936
943
  if (!customElements.get(tagName)) {
937
- defineCustomElement$l();
944
+ defineCustomElement$m();
938
945
  }
939
946
  break;
940
947
  case "bal-list-item-accordion-head":
941
948
  if (!customElements.get(tagName)) {
942
- defineCustomElement$k();
949
+ defineCustomElement$l();
943
950
  }
944
951
  break;
945
952
  case "bal-list-item-content":
946
953
  if (!customElements.get(tagName)) {
947
- defineCustomElement$j();
954
+ defineCustomElement$k();
948
955
  }
949
956
  break;
950
957
  case "bal-list-item-icon":
951
958
  if (!customElements.get(tagName)) {
952
- defineCustomElement$i();
959
+ defineCustomElement$j();
953
960
  }
954
961
  break;
955
962
  case "bal-list-item-title":
956
963
  if (!customElements.get(tagName)) {
957
- defineCustomElement$h();
964
+ defineCustomElement$i();
958
965
  }
959
966
  break;
960
967
  case "bal-logo":
961
968
  if (!customElements.get(tagName)) {
962
- defineCustomElement$g();
969
+ defineCustomElement$h();
963
970
  }
964
971
  break;
965
972
  case "bal-nav-link":
966
973
  if (!customElements.get(tagName)) {
967
- defineCustomElement$f();
974
+ defineCustomElement$g();
968
975
  }
969
976
  break;
970
977
  case "bal-nav-link-grid":
971
978
  if (!customElements.get(tagName)) {
972
- defineCustomElement$e();
979
+ defineCustomElement$f();
973
980
  }
974
981
  break;
975
982
  case "bal-nav-link-grid-col":
976
983
  if (!customElements.get(tagName)) {
977
- defineCustomElement$d();
984
+ defineCustomElement$e();
978
985
  }
979
986
  break;
980
987
  case "bal-nav-menu-bar":
981
988
  if (!customElements.get(tagName)) {
982
- defineCustomElement$c();
989
+ defineCustomElement$d();
983
990
  }
984
991
  break;
985
992
  case "bal-nav-menu-flyout":
986
993
  if (!customElements.get(tagName)) {
987
- defineCustomElement$b();
994
+ defineCustomElement$c();
988
995
  }
989
996
  break;
990
997
  case "bal-nav-meta-bar":
991
998
  if (!customElements.get(tagName)) {
992
- defineCustomElement$a();
999
+ defineCustomElement$b();
993
1000
  }
994
1001
  break;
995
1002
  case "bal-popover":
996
1003
  if (!customElements.get(tagName)) {
997
- defineCustomElement$9();
1004
+ defineCustomElement$a();
998
1005
  }
999
1006
  break;
1000
1007
  case "bal-popover-content":
1001
1008
  if (!customElements.get(tagName)) {
1002
- defineCustomElement$8();
1009
+ defineCustomElement$9();
1003
1010
  }
1004
1011
  break;
1005
1012
  case "bal-select":
1006
1013
  if (!customElements.get(tagName)) {
1007
- defineCustomElement$7();
1014
+ defineCustomElement$8();
1008
1015
  }
1009
1016
  break;
1010
1017
  case "bal-select-option":
1011
1018
  if (!customElements.get(tagName)) {
1012
- defineCustomElement$6();
1019
+ defineCustomElement$7();
1013
1020
  }
1014
1021
  break;
1015
1022
  case "bal-spinner":
1016
1023
  if (!customElements.get(tagName)) {
1017
- defineCustomElement$5();
1024
+ defineCustomElement$6();
1018
1025
  }
1019
1026
  break;
1020
1027
  case "bal-stack":
1028
+ if (!customElements.get(tagName)) {
1029
+ defineCustomElement$5();
1030
+ }
1031
+ break;
1032
+ case "bal-switch":
1021
1033
  if (!customElements.get(tagName)) {
1022
1034
  defineCustomElement$4();
1023
1035
  }
@@ -10,11 +10,13 @@ import { s as stopEventBubbling } from './form-input.js';
10
10
  import { m as rIC, l as debounce, e as waitAfterIdleCallback, d as deepReady, i as isDescendant } from './helpers.js';
11
11
  import { L as Logger } from './log.js';
12
12
  import { r as removeValue, p as preventDefault, l as length, g as getValues, i as includes, s as startsWith, a as addValue, f as findLabelByValue, b as findOptionByLabel, v as validateAfterBlur } from './utils.js';
13
- import { d as defineCustomElement$6 } from './bal-checkbox2.js';
14
- import { d as defineCustomElement$5 } from './bal-close2.js';
15
- import { d as defineCustomElement$4 } from './bal-icon2.js';
16
- import { d as defineCustomElement$3 } from './bal-popover2.js';
17
- import { d as defineCustomElement$2 } from './bal-popover-content2.js';
13
+ import { d as defineCustomElement$8 } from './bal-check2.js';
14
+ import { d as defineCustomElement$7 } from './bal-checkbox2.js';
15
+ import { d as defineCustomElement$6 } from './bal-close2.js';
16
+ import { d as defineCustomElement$5 } from './bal-icon2.js';
17
+ import { d as defineCustomElement$4 } from './bal-popover2.js';
18
+ import { d as defineCustomElement$3 } from './bal-popover-content2.js';
19
+ import { d as defineCustomElement$2 } from './bal-switch2.js';
18
20
  import { d as defineCustomElement$1 } from './bal-tag2.js';
19
21
  import { a as isSpaceKey, b as isArrowDownKey, c as isArrowUpKey, i as isEnterKey, d as isEscapeKey, f as isBackspaceKey } from './keyboard.helpers.js';
20
22
 
@@ -870,34 +872,44 @@ function defineCustomElement() {
870
872
  if (typeof customElements === "undefined") {
871
873
  return;
872
874
  }
873
- const components = ["bal-select", "bal-checkbox", "bal-close", "bal-icon", "bal-popover", "bal-popover-content", "bal-tag"];
875
+ const components = ["bal-select", "bal-check", "bal-checkbox", "bal-close", "bal-icon", "bal-popover", "bal-popover-content", "bal-switch", "bal-tag"];
874
876
  components.forEach(tagName => { switch (tagName) {
875
877
  case "bal-select":
876
878
  if (!customElements.get(tagName)) {
877
879
  customElements.define(tagName, Select);
878
880
  }
879
881
  break;
882
+ case "bal-check":
883
+ if (!customElements.get(tagName)) {
884
+ defineCustomElement$8();
885
+ }
886
+ break;
880
887
  case "bal-checkbox":
881
888
  if (!customElements.get(tagName)) {
882
- defineCustomElement$6();
889
+ defineCustomElement$7();
883
890
  }
884
891
  break;
885
892
  case "bal-close":
886
893
  if (!customElements.get(tagName)) {
887
- defineCustomElement$5();
894
+ defineCustomElement$6();
888
895
  }
889
896
  break;
890
897
  case "bal-icon":
891
898
  if (!customElements.get(tagName)) {
892
- defineCustomElement$4();
899
+ defineCustomElement$5();
893
900
  }
894
901
  break;
895
902
  case "bal-popover":
896
903
  if (!customElements.get(tagName)) {
897
- defineCustomElement$3();
904
+ defineCustomElement$4();
898
905
  }
899
906
  break;
900
907
  case "bal-popover-content":
908
+ if (!customElements.get(tagName)) {
909
+ defineCustomElement$3();
910
+ }
911
+ break;
912
+ case "bal-switch":
901
913
  if (!customElements.get(tagName)) {
902
914
  defineCustomElement$2();
903
915
  }
@@ -1,77 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { B as BEM } from './bem.js';
3
- import { d as defineCustomElement$2 } from './bal-icon2.js';
4
-
5
- const balSwitchCss = ":root{--bal-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-checkbox-switch-label-background-pressed-after:var(--bal-color-border-primary-pressed);--bal-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-border-danger-hovered);--bal-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-checkbox-switch-label-background-invalid-pressed-after:var(--bal-color-border-danger-pressed);--bal-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-checkbox-switch-label-background-invalid-checked-hovered-before:var(--bal-color-border-danger-hovered);--bal-checkbox-switch-label-background-invalid-checked-pressed-before:var(--bal-color-border-danger-pressed);--bal-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white)}.bal-switch{display:-ms-inline-flexbox;display:inline-flex;position:relative;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:2.5rem;height:1.5rem;padding:.25rem;border-radius:var(--bal-radius-rounded);overflow:hidden;background:var(--bal-checkbox-switch-label-background-before)}@media (hover: hover)and (pointer: fine){.bal-switch--hovered,.bal-switch:hover{background:var(--bal-checkbox-switch-label-background-before)}.bal-switch--hovered .bal-switch__toggle,.bal-switch:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-hover-after)}}.bal-switch--pressed,.bal-switch:active{background:var(--bal-checkbox-switch-label-background-before)}.bal-switch--pressed .bal-switch__toggle,.bal-switch:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-pressed-after)}.bal-switch--checked{background:var(--bal-checkbox-switch-label-background-checked-before)}.bal-switch--checked .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}@media (hover: hover)and (pointer: fine){.bal-switch--checked.bal-switch--hovered,.bal-switch--checked:hover{background:var(--bal-checkbox-switch-label-background-checked-hover-before)}.bal-switch--checked.bal-switch--hovered .bal-switch__toggle,.bal-switch--checked:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}}.bal-switch--checked.bal-switch--pressed,.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-checked-active-before)}.bal-switch--checked.bal-switch--pressed .bal-switch__toggle,.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}.bal-switch--invalid{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-after)}@media (hover: hover)and (pointer: fine){.bal-switch--invalid.bal-switch--hovered,.bal-switch--invalid:hover{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid.bal-switch--hovered .bal-switch__toggle,.bal-switch--invalid:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-hover-after)}}.bal-switch--invalid.bal-switch--pressed,.bal-switch--invalid:active{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid.bal-switch--pressed .bal-switch__toggle,.bal-switch--invalid:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-pressed-after)}.bal-switch--invalid.bal-switch--checked.bal-switch,.bal-switch--invalid.bal-switch--checked{background:var(--bal-checkbox-switch-label-background-invalid-checked-before)}.bal-switch--invalid.bal-switch--checked.bal-switch .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--invalid.bal-switch--checked.bal-switch--hovered,.bal-switch--invalid.bal-switch--checked:hover{background:var(--bal-checkbox-switch-label-background-invalid-checked-hovered-before)}.bal-switch--invalid.bal-switch--checked.bal-switch--hovered .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--invalid.bal-switch--checked.bal-switch--pressed,.bal-switch--invalid.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-invalid-checked-pressed-before)}.bal-switch--invalid.bal-switch--checked.bal-switch--pressed .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--disabled,.bal-switch--disabled:hover,.bal-switch--disabled:active{background:var(--bal-checkbox-switch-label-background-disabled-hover-active-before)}.bal-switch--disabled .bal-switch__toggle,.bal-switch--disabled:hover .bal-switch__toggle,.bal-switch--disabled:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-disabled-hover-active-after)}.bal-switch--disabled.bal-switch--checked,.bal-switch--disabled.bal-switch--checked:hover,.bal-switch--disabled.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-switch--disabled.bal-switch--checked .bal-switch__toggle,.bal-switch--disabled.bal-switch--checked:hover .bal-switch__toggle,.bal-switch--disabled.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-disabled-checked-hover-active-after)}.bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-after);border-radius:50%;position:absolute;top:.25rem;width:1rem;height:1rem;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out, -webkit-transform .3s ease-in-out}.bal-switch__toggle--checked{-webkit-transform:translateX(100%);transform:translateX(100%);background:var(--bal-checkbox-switch-label-background-checked-after)}.bal-switch .bal-icon{position:absolute}.bal-switch .bal-icon .bal-switch__icon--checked{opacity:1}.bal-switch .bal-icon .bal-switch__icon{opacity:0;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}";
6
-
7
- const Switch = /*@__PURE__*/ proxyCustomElement(class Switch extends HTMLElement {
8
- constructor(registerHost) {
9
- super();
10
- if (registerHost !== false) {
11
- this.__registerHost();
12
- }
13
- /**
14
- * PUBLIC PROPERTY API
15
- * ------------------------------------------------------
16
- */
17
- /**
18
- * If `true`, the checkbox is selected.
19
- */
20
- this.checked = false;
21
- /**
22
- * If `true` the component gets a invalid red style.
23
- */
24
- this.invalid = undefined;
25
- /**
26
- * If `true`, the element is not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants.
27
- */
28
- this.disabled = undefined;
29
- /**
30
- * @internal
31
- */
32
- this.hovered = false;
33
- /**
34
- * @internal
35
- */
36
- this.pressed = false;
37
- }
38
- /**
39
- * RENDER
40
- * ------------------------------------------------------
41
- */
42
- render() {
43
- const block = BEM.block('switch');
44
- const checked = !!this.checked;
45
- const disabled = !!this.disabled;
46
- const invalid = !!this.invalid;
47
- return (h(Host, { key: '44e17aefdee7df228e92368c3863509a4dcd4bc8', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('checked').class(checked)), block.modifier('disabled').class(disabled)), block.modifier('invalid').class(invalid)), block.modifier('hovered').class(this.hovered)), block.modifier('pressed').class(this.pressed)) }, h("bal-icon", { key: '1f27c8f3f92467ea80de321666e597c8ea7cde89', name: "check", color: "white", size: "small", "aria-hidden": "true", colorHovered: "white", colorPressed: "white", hovered: this.hovered, pressed: this.pressed, class: Object.assign({}, block.element('icon').modifier('checked').class(checked)) }), h("div", { key: 'd22b87a1a091669422db72acf16d48a4c4e8825f', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('toggle').class()), block.element('toggle').modifier('checked').class(checked)), block.element('toggle').modifier('disabled').class(disabled)), block.element('toggle').modifier('invalid').class(invalid)), block.modifier('hovered').class(this.hovered)), block.modifier('pressed').class(this.pressed)) })));
48
- }
49
- static get style() { return balSwitchCss; }
50
- }, [256, "bal-switch", {
51
- "checked": [1028],
52
- "invalid": [4],
53
- "disabled": [4],
54
- "hovered": [4],
55
- "pressed": [4]
56
- }]);
57
- function defineCustomElement$1() {
58
- if (typeof customElements === "undefined") {
59
- return;
60
- }
61
- const components = ["bal-switch", "bal-icon"];
62
- components.forEach(tagName => { switch (tagName) {
63
- case "bal-switch":
64
- if (!customElements.get(tagName)) {
65
- customElements.define(tagName, Switch);
66
- }
67
- break;
68
- case "bal-icon":
69
- if (!customElements.get(tagName)) {
70
- defineCustomElement$2();
71
- }
72
- break;
73
- } });
74
- }
1
+ import { S as Switch, d as defineCustomElement$1 } from './bal-switch2.js';
75
2
 
76
3
  const BalSwitch = Switch;
77
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,11 +1,15 @@
1
- import { r as registerInstance, h, H as Host } from './index-BdVwMG9u.js';
2
- import { B as BEM } from './bem-ByiN-QjD.js';
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { B as BEM } from './bem.js';
3
+ import { d as defineCustomElement$1 } from './bal-icon2.js';
3
4
 
4
5
  const balSwitchCss = ":root{--bal-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-checkbox-switch-label-background-pressed-after:var(--bal-color-border-primary-pressed);--bal-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-border-danger-hovered);--bal-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-checkbox-switch-label-background-invalid-pressed-after:var(--bal-color-border-danger-pressed);--bal-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-checkbox-switch-label-background-invalid-checked-hovered-before:var(--bal-color-border-danger-hovered);--bal-checkbox-switch-label-background-invalid-checked-pressed-before:var(--bal-color-border-danger-pressed);--bal-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white)}.bal-switch{display:-ms-inline-flexbox;display:inline-flex;position:relative;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:2.5rem;height:1.5rem;padding:.25rem;border-radius:var(--bal-radius-rounded);overflow:hidden;background:var(--bal-checkbox-switch-label-background-before)}@media (hover: hover)and (pointer: fine){.bal-switch--hovered,.bal-switch:hover{background:var(--bal-checkbox-switch-label-background-before)}.bal-switch--hovered .bal-switch__toggle,.bal-switch:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-hover-after)}}.bal-switch--pressed,.bal-switch:active{background:var(--bal-checkbox-switch-label-background-before)}.bal-switch--pressed .bal-switch__toggle,.bal-switch:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-pressed-after)}.bal-switch--checked{background:var(--bal-checkbox-switch-label-background-checked-before)}.bal-switch--checked .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}@media (hover: hover)and (pointer: fine){.bal-switch--checked.bal-switch--hovered,.bal-switch--checked:hover{background:var(--bal-checkbox-switch-label-background-checked-hover-before)}.bal-switch--checked.bal-switch--hovered .bal-switch__toggle,.bal-switch--checked:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}}.bal-switch--checked.bal-switch--pressed,.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-checked-active-before)}.bal-switch--checked.bal-switch--pressed .bal-switch__toggle,.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}.bal-switch--invalid{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-after)}@media (hover: hover)and (pointer: fine){.bal-switch--invalid.bal-switch--hovered,.bal-switch--invalid:hover{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid.bal-switch--hovered .bal-switch__toggle,.bal-switch--invalid:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-hover-after)}}.bal-switch--invalid.bal-switch--pressed,.bal-switch--invalid:active{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid.bal-switch--pressed .bal-switch__toggle,.bal-switch--invalid:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-pressed-after)}.bal-switch--invalid.bal-switch--checked.bal-switch,.bal-switch--invalid.bal-switch--checked{background:var(--bal-checkbox-switch-label-background-invalid-checked-before)}.bal-switch--invalid.bal-switch--checked.bal-switch .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--invalid.bal-switch--checked.bal-switch--hovered,.bal-switch--invalid.bal-switch--checked:hover{background:var(--bal-checkbox-switch-label-background-invalid-checked-hovered-before)}.bal-switch--invalid.bal-switch--checked.bal-switch--hovered .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--invalid.bal-switch--checked.bal-switch--pressed,.bal-switch--invalid.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-invalid-checked-pressed-before)}.bal-switch--invalid.bal-switch--checked.bal-switch--pressed .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--disabled,.bal-switch--disabled:hover,.bal-switch--disabled:active{background:var(--bal-checkbox-switch-label-background-disabled-hover-active-before)}.bal-switch--disabled .bal-switch__toggle,.bal-switch--disabled:hover .bal-switch__toggle,.bal-switch--disabled:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-disabled-hover-active-after)}.bal-switch--disabled.bal-switch--checked,.bal-switch--disabled.bal-switch--checked:hover,.bal-switch--disabled.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-switch--disabled.bal-switch--checked .bal-switch__toggle,.bal-switch--disabled.bal-switch--checked:hover .bal-switch__toggle,.bal-switch--disabled.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-disabled-checked-hover-active-after)}.bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-after);border-radius:50%;position:absolute;top:.25rem;width:1rem;height:1rem;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out, -webkit-transform .3s ease-in-out}.bal-switch__toggle--checked{-webkit-transform:translateX(100%);transform:translateX(100%);background:var(--bal-checkbox-switch-label-background-checked-after)}.bal-switch .bal-icon{position:absolute}.bal-switch .bal-icon .bal-switch__icon--checked{opacity:1}.bal-switch .bal-icon .bal-switch__icon{opacity:0;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}";
5
6
 
6
- const Switch = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
7
+ const Switch = /*@__PURE__*/ proxyCustomElement(class Switch extends HTMLElement {
8
+ constructor(registerHost) {
9
+ super();
10
+ if (registerHost !== false) {
11
+ this.__registerHost();
12
+ }
9
13
  /**
10
14
  * PUBLIC PROPERTY API
11
15
  * ------------------------------------------------------
@@ -42,7 +46,31 @@ const Switch = class {
42
46
  const invalid = !!this.invalid;
43
47
  return (h(Host, { key: '44e17aefdee7df228e92368c3863509a4dcd4bc8', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('checked').class(checked)), block.modifier('disabled').class(disabled)), block.modifier('invalid').class(invalid)), block.modifier('hovered').class(this.hovered)), block.modifier('pressed').class(this.pressed)) }, h("bal-icon", { key: '1f27c8f3f92467ea80de321666e597c8ea7cde89', name: "check", color: "white", size: "small", "aria-hidden": "true", colorHovered: "white", colorPressed: "white", hovered: this.hovered, pressed: this.pressed, class: Object.assign({}, block.element('icon').modifier('checked').class(checked)) }), h("div", { key: 'd22b87a1a091669422db72acf16d48a4c4e8825f', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('toggle').class()), block.element('toggle').modifier('checked').class(checked)), block.element('toggle').modifier('disabled').class(disabled)), block.element('toggle').modifier('invalid').class(invalid)), block.modifier('hovered').class(this.hovered)), block.modifier('pressed').class(this.pressed)) })));
44
48
  }
45
- };
46
- Switch.style = balSwitchCss;
49
+ static get style() { return balSwitchCss; }
50
+ }, [256, "bal-switch", {
51
+ "checked": [1028],
52
+ "invalid": [4],
53
+ "disabled": [4],
54
+ "hovered": [4],
55
+ "pressed": [4]
56
+ }]);
57
+ function defineCustomElement() {
58
+ if (typeof customElements === "undefined") {
59
+ return;
60
+ }
61
+ const components = ["bal-switch", "bal-icon"];
62
+ components.forEach(tagName => { switch (tagName) {
63
+ case "bal-switch":
64
+ if (!customElements.get(tagName)) {
65
+ customElements.define(tagName, Switch);
66
+ }
67
+ break;
68
+ case "bal-icon":
69
+ if (!customElements.get(tagName)) {
70
+ defineCustomElement$1();
71
+ }
72
+ break;
73
+ } });
74
+ }
47
75
 
48
- export { Switch as bal_switch };
76
+ export { Switch as S, defineCustomElement as d };