@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.
@@ -598,12 +598,6 @@ const CCheckbox = class {
598
598
  this.checked = this.trueValue === value;
599
599
  this.internals.setFormValue(this.checked ? this.trueValue.toString() : this.falseValue.toString());
600
600
  }
601
- handleKeyDown(event) {
602
- if (['Space'].includes(event.code)) {
603
- event.preventDefault();
604
- this._toggleState(event);
605
- }
606
- }
607
601
  componentWillLoad() {
608
602
  CCheckbox._uniqueId += 1;
609
603
  this.checked = this.checked || this.value === this.trueValue;
@@ -628,7 +622,7 @@ const CCheckbox = class {
628
622
  'c-checkbox__label--indeterminate': this.indeterminate,
629
623
  };
630
624
  const slotHasContent = !!this.el.childNodes.length;
631
- return (h(Host, { key: 'ab560c6dc7788733d4a6748e53b99fd8d0dc0ce0' }, h("div", { key: '041126c64cddfe45f1881af37d40b4dc1471ce56', class: wrapperClasses }, 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) })), h("label", { key: '88275f95722ba17471a7dc2468463990c8338997', class: labelClasses, htmlFor: "checkbox" }, h("div", { key: '442072d513e6f96ed4bd9ef30294f3d1f966c796', class: "ripple", ref: (el) => (this._container = el) }, h("svg", { key: '5f1921f354de5e6c113f1a36cb9e30c62562ece2', viewBox: "0 0 100 100" }, !this.indeterminate && this.checked && (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 && (h("path", { key: '114f194c3747c9fd0ca1d1c491cbcc13bee81b36', class: "path", d: "M20 56 h60 v-8 h-60 z" }))), h("c-ripple", { key: 'b123223694956aa7d7bd72f4553a881391278d0e', ref: (el) => (this._rippleElement = el) })), (!!this.label || slotHasContent) && (h("div", { key: '90c353e3f3a5234b9ff8b21e25b98aca74a7e671', class: "c-checkbox__label-content" }, !!this.label ? this.label : h("slot", null), this.required && h("span", { key: 'fa3106a26eb313ecb38461dec275a9ed0b98f8a6', class: "required" }, "\u00A0*"))))), !this.hideDetails && (h("c-message", { key: '03c0d58331c1ab621f18fa529f478b1269577457', hint: this.hint, inputId: this._id, valid: this.valid, validation: this.validation }))));
625
+ return (h(Host, { key: '1009c3bff3bc9bac017291c5954c43261582bf86' }, h("div", { key: '814b2295db78a235803f7c5a51247611914f18da', class: wrapperClasses }, 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) })), h("label", { key: '09d7329241d15599aa601b1d9a3d3866c48bbec4', class: labelClasses, htmlFor: "checkbox" }, h("div", { key: '6a9a3f93a340be38e727e471eb901e7437a41951', class: "ripple", ref: (el) => (this._container = el) }, h("svg", { key: '2899e81018f5a5b382825897c8747ba5384bcdfc', viewBox: "0 0 100 100" }, !this.indeterminate && this.checked && (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 && (h("path", { key: '8fa571f6c886ad33826e4ec809a1bd52098e33f3', class: "path", d: "M20 56 h60 v-8 h-60 z" }))), h("c-ripple", { key: '8596c85038aeed58bd6a64de477da71985d227c4', ref: (el) => (this._rippleElement = el) })), (!!this.label || slotHasContent) && (h("div", { key: '65aade574afb77949da13aef2f483e9cbf3bb384', class: "c-checkbox__label-content" }, !!this.label ? this.label : h("slot", null), this.required && h("span", { key: '6abd763d6002bc41e95bd92db36c4bd8a42edcd4', class: "required" }, "\u00A0*"))))), !this.hideDetails && (h("c-message", { key: '0d316acf7535ea2a57482429e2c88e4121124cb4', hint: this.hint, inputId: this._id, valid: this.valid, validation: this.validation }))));
632
626
  }
633
627
  static get formAssociated() { return true; }
634
628
  get el() { return getElement(this); }