@patternfly/react-table 4.106.5 → 4.106.6

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.
@@ -1550,6 +1550,8 @@
1550
1550
  prefix: 'pf-random-id-'
1551
1551
  };
1552
1552
 
1553
+ const ASTERISK = '*';
1554
+
1553
1555
  let uid = 0;
1554
1556
  const ouiaPrefix = 'OUIA-Generated-';
1555
1557
  const ouiaIdByRoute = {};
@@ -7280,7 +7282,7 @@
7280
7282
  };
7281
7283
  }
7282
7284
  render() {
7283
- const _a = this.props, { 'aria-label': ariaLabel, className, onChange, isValid, isDisabled, isChecked, label, checked, defaultChecked, description, body, ouiaId, ouiaSafe, component: Component } = _a, props = __rest$1(_a, ['aria-label', "className", "onChange", "isValid", "isDisabled", "isChecked", "label", "checked", "defaultChecked", "description", "body", "ouiaId", "ouiaSafe", "component"]);
7285
+ const _a = this.props, { 'aria-label': ariaLabel, className, onChange, isValid, isDisabled, isRequired, isChecked, label, checked, defaultChecked, description, body, ouiaId, ouiaSafe, component: Component } = _a, props = __rest$1(_a, ['aria-label', "className", "onChange", "isValid", "isDisabled", "isRequired", "isChecked", "label", "checked", "defaultChecked", "description", "body", "ouiaId", "ouiaSafe", "component"]);
7284
7286
  if (!props.id) {
7285
7287
  // eslint-disable-next-line no-console
7286
7288
  console.error('Checkbox:', 'id is required to make input accessible');
@@ -7297,8 +7299,10 @@
7297
7299
  }
7298
7300
  checkedProps.checked = checkedProps.checked === null ? false : checkedProps.checked;
7299
7301
  return (React__namespace.createElement(Component, { className: css(checkStyles.check, !label && checkStyles.modifiers.standalone, className) },
7300
- React__namespace.createElement("input", Object.assign({}, props, { className: css(checkStyles.checkInput), type: "checkbox", onChange: this.handleChange, "aria-invalid": !isValid, "aria-label": ariaLabel, disabled: isDisabled, ref: elem => elem && (elem.indeterminate = isChecked === null) }, checkedProps, getOUIAProps(Checkbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))),
7301
- label && (React__namespace.createElement("label", { className: css(checkStyles.checkLabel, isDisabled && checkStyles.modifiers.disabled), htmlFor: props.id }, label)),
7302
+ React__namespace.createElement("input", Object.assign({}, props, { className: css(checkStyles.checkInput), type: "checkbox", onChange: this.handleChange, "aria-invalid": !isValid, "aria-label": ariaLabel, disabled: isDisabled, required: isRequired, ref: elem => elem && (elem.indeterminate = isChecked === null) }, checkedProps, getOUIAProps(Checkbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))),
7303
+ label && (React__namespace.createElement("label", { className: css(checkStyles.checkLabel, isDisabled && checkStyles.modifiers.disabled), htmlFor: props.id },
7304
+ label,
7305
+ isRequired && (React__namespace.createElement("span", { className: css(checkStyles.checkLabelRequired), "aria-hidden": "true" }, ASTERISK)))),
7302
7306
  description && React__namespace.createElement("span", { className: css(checkStyles.checkDescription) }, description),
7303
7307
  body && React__namespace.createElement("span", { className: css(checkStyles.checkBody) }, body)));
7304
7308
  }
@@ -7308,6 +7312,7 @@
7308
7312
  className: '',
7309
7313
  isValid: true,
7310
7314
  isDisabled: false,
7315
+ isRequired: false,
7311
7316
  isChecked: false,
7312
7317
  onChange: defaultOnChange,
7313
7318
  ouiaSafe: true,