set colorVariant(val) {
    let safeVal = null;
    if (typeof val === 'string') {
      safeVal = IdsXssUtils.stripTags(val, '');
    }

    if (this.colorVariants.includes(safeVal)) {
      this.setAttribute(attributes.COLOR_VARIANT, `${safeVal}`);
    } else {
      this.removeAttribute(attributes.COLOR_VARIANT);
      safeVal = null;
    }

    if (this.state.colorVariant !== safeVal) {
      this.state.colorVariant = safeVal;
      this.#refreshColorVariant(safeVal);
    }
  }
/**
   * @param {string|null} val the name of the color variant to be applied
   */
@param {string|null} val the name of the color variant to be applied
@param { string|null } val the name of the color variant to be applied
set colorVariant(val) {
    let safeVal = null;
    if (typeof val === 'string') {
      safeVal = IdsXssUtils.stripTags(val, '');
    }
    if (this.colorVariants.includes(safeVal)) {
      this.setAttribute(attributes.COLOR_VARIANT, `${safeVal}`);
    } else {
      this.removeAttribute(attributes.COLOR_VARIANT);
      safeVal = null;
    }
    if (this.state.colorVariant !== safeVal) {
      this.state.colorVariant = safeVal;
      this.#refreshColorVariant(safeVal);
    }
  }
set colorVariant ( val ) { let safeVal = null ; if ( typeof val === 'string' ) { safeVal = IdsXssUtils . stripTags ( val , '' ) ; } if ( this . colorVariants . includes ( safeVal ) ) { this . setAttribute ( attributes . COLOR_VARIANT , ` ${ safeVal } ` ) ; } else { this . removeAttribute ( attributes . COLOR_VARIANT ) ; safeVal = null ; } if ( this . state . colorVariant !== safeVal ) { this . state . colorVariant = safeVal ; this . #refreshColorVariant ( safeVal ) ; } }
@param {string|null} val the name of the color variant to be applied
@param { string|null } val the name of the color variant to be applied