@agility/plenum-ui 1.3.19 → 1.3.20

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.
@@ -3,7 +3,7 @@ export interface CheckboxProps {
3
3
  /** Checkbox label */
4
4
  label: string;
5
5
  /** Checkbox ID */
6
- id: string;
6
+ id?: string;
7
7
  /** Disabled state */
8
8
  isDisabled?: boolean;
9
9
  /** value */
package/lib/index.esm.js CHANGED
@@ -12768,6 +12768,9 @@ var Select = function (_a) {
12768
12768
  /** Comment */
12769
12769
  var Checkbox = function (_a) {
12770
12770
  var label = _a.label, id = _a.id, isDisabled = _a.isDisabled, isChecked = _a.isChecked, isRequired = _a.isRequired, isError = _a.isError, message = _a.message, value = _a.value, onChange = _a.onChange;
12771
+ var uniqueID = useId();
12772
+ if (!id)
12773
+ id = "cb-".concat(uniqueID);
12771
12774
  var checboxStyles = cn('focus:ring-purple-500 h-4 w-4 text-purple-600 border-gray-300 rounded', { 'border-red-500 shadow-none': isError });
12772
12775
  var wrapperStyles = cn('relative flex items-start', { 'opacity-50': isDisabled });
12773
12776
  var handleChange = function (e) {