@cscfi/csc-ui 2.3.0 → 2.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.
@@ -602,12 +602,6 @@ const CCheckbox = class {
602
602
  this.checked = this.trueValue === value;
603
603
  this.internals.setFormValue(this.checked ? this.trueValue.toString() : this.falseValue.toString());
604
604
  }
605
- handleKeyDown(event) {
606
- if (['Space'].includes(event.code)) {
607
- event.preventDefault();
608
- this._toggleState(event);
609
- }
610
- }
611
605
  componentWillLoad() {
612
606
  CCheckbox._uniqueId += 1;
613
607
  this.checked = this.checked || this.value === this.trueValue;
@@ -632,7 +626,7 @@ const CCheckbox = class {
632
626
  'c-checkbox__label--indeterminate': this.indeterminate,
633
627
  };
634
628
  const slotHasContent = !!this.el.childNodes.length;
635
- return (index.h(index.Host, { key: 'ab560c6dc7788733d4a6748e53b99fd8d0dc0ce0' }, index.h("div", { key: '041126c64cddfe45f1881af37d40b4dc1471ce56', class: wrapperClasses }, index.h("input", Object.assign({ key: '14f3f184bf19a201e631a7e87dd0b14e0d59122d', class: "visuallyhidden", id: "checkbox" }, (!!this.hostName ? { name: this.hostName } : {}), { type: "checkbox", "aria-checked": this.checked.toString(), "aria-disabled": this.disabled.toString(), checked: this.checked ? true : undefined, disabled: this.disabled, onChange: (event) => this._toggleState(event) })), index.h("label", { key: '88275f95722ba17471a7dc2468463990c8338997', class: labelClasses, htmlFor: "checkbox" }, index.h("div", { key: '442072d513e6f96ed4bd9ef30294f3d1f966c796', class: "ripple", ref: (el) => (this._container = el) }, index.h("svg", { key: '5f1921f354de5e6c113f1a36cb9e30c62562ece2', viewBox: "0 0 100 100" }, !this.indeterminate && this.checked && (index.h("path", { key: '8b5619c99bd7ab1bdba34a8e8eb4db53bec86542', class: "path", d: "M 12 52 l 24 24 l 47 -47 l -3 -3 l -44 44 l -21 -21 l -3 3" })), this.indeterminate && (index.h("path", { key: '114f194c3747c9fd0ca1d1c491cbcc13bee81b36', class: "path", d: "M20 56 h60 v-8 h-60 z" }))), index.h("c-ripple", { key: 'b123223694956aa7d7bd72f4553a881391278d0e', ref: (el) => (this._rippleElement = el) })), (!!this.label || slotHasContent) && (index.h("div", { key: '90c353e3f3a5234b9ff8b21e25b98aca74a7e671', class: "c-checkbox__label-content" }, !!this.label ? this.label : index.h("slot", null), this.required && index.h("span", { key: 'fa3106a26eb313ecb38461dec275a9ed0b98f8a6', class: "required" }, "\u00A0*"))))), !this.hideDetails && (index.h("c-message", { key: '03c0d58331c1ab621f18fa529f478b1269577457', hint: this.hint, inputId: this._id, valid: this.valid, validation: this.validation }))));
629
+ return (index.h(index.Host, { key: '1009c3bff3bc9bac017291c5954c43261582bf86' }, index.h("div", { key: '814b2295db78a235803f7c5a51247611914f18da', class: wrapperClasses }, index.h("input", Object.assign({ key: '27ba9d9a511328903beb7a2fb6daa755b2168a33', class: "visuallyhidden", id: "checkbox" }, (!!this.hostName ? { name: this.hostName } : {}), { type: "checkbox", "aria-checked": this.checked.toString(), "aria-disabled": this.disabled.toString(), checked: this.checked ? true : undefined, disabled: this.disabled, onChange: (event) => this._toggleState(event) })), index.h("label", { key: '09d7329241d15599aa601b1d9a3d3866c48bbec4', class: labelClasses, htmlFor: "checkbox" }, index.h("div", { key: '6a9a3f93a340be38e727e471eb901e7437a41951', class: "ripple", ref: (el) => (this._container = el) }, index.h("svg", { key: '2899e81018f5a5b382825897c8747ba5384bcdfc', viewBox: "0 0 100 100" }, !this.indeterminate && this.checked && (index.h("path", { key: '1cf482eae7e9c75be630a369342a6ba48d8f9e11', class: "path", d: "M 12 52 l 24 24 l 47 -47 l -3 -3 l -44 44 l -21 -21 l -3 3" })), this.indeterminate && (index.h("path", { key: '8fa571f6c886ad33826e4ec809a1bd52098e33f3', class: "path", d: "M20 56 h60 v-8 h-60 z" }))), index.h("c-ripple", { key: '8596c85038aeed58bd6a64de477da71985d227c4', ref: (el) => (this._rippleElement = el) })), (!!this.label || slotHasContent) && (index.h("div", { key: '65aade574afb77949da13aef2f483e9cbf3bb384', class: "c-checkbox__label-content" }, !!this.label ? this.label : index.h("slot", null), this.required && index.h("span", { key: '6abd763d6002bc41e95bd92db36c4bd8a42edcd4', class: "required" }, "\u00A0*"))))), !this.hideDetails && (index.h("c-message", { key: '0d316acf7535ea2a57482429e2c88e4121124cb4', hint: this.hint, inputId: this._id, valid: this.valid, validation: this.validation }))));
636
630
  }
637
631
  static get formAssociated() { return true; }
638
632
  get el() { return index.getElement(this); }