@devtron-labs/devtron-fe-common-lib 0.0.7-beta-32 → 0.0.7-beta-34

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.
package/dist/index.js CHANGED
@@ -4268,7 +4268,7 @@ var RadioGroupItem = /** @class */ (function (_super) {
4268
4268
  RadioGroupItem.prototype.render = function () {
4269
4269
  var _this = this;
4270
4270
  return (jsxRuntime.jsx(RadioGroupContext.Consumer, { children: function (context) {
4271
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: context.disabled ? 'form__radio-item disabled' : 'form__radio-item' }, { children: [jsxRuntime.jsx("input", { type: "radio", className: "form__checkbox", name: context.name, disabled: context.disabled, onChange: context.onChange, value: _this.props.value, checked: context.value === _this.props.value, "data-testid": _this.props.dataTestId }), jsxRuntime.jsxs("span", __assign({ className: "form__radio-item-content" }, { children: [jsxRuntime.jsx("span", { className: "radio__button" }), jsxRuntime.jsx("span", __assign({ className: "radio__title" }, { children: _this.props.children }))] }))] })) }));
4271
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: context.disabled ? 'form__radio-item disabled' : 'form__radio-item' }, { children: [jsxRuntime.jsx("input", { type: "radio", className: "form__checkbox", name: context.name, disabled: context.disabled, onChange: context.onChange, value: _this.props.value, checked: context.value === _this.props.value, "data-testid": _this.props.dataTestId }), jsxRuntime.jsxs("span", __assign({ className: "form__radio-item-content", "data-testid": "".concat(_this.props.dataTestId, "-span") }, { children: [jsxRuntime.jsx("span", { className: "radio__button" }), jsxRuntime.jsx("span", __assign({ className: "radio__title" }, { children: _this.props.children }))] }))] })) }));
4272
4272
  } }));
4273
4273
  };
4274
4274
  return RadioGroupItem;
@@ -16415,7 +16415,7 @@ var Checkbox = /** @class */ (function (_super) {
16415
16415
  Checkbox.prototype.render = function () {
16416
16416
  var _a;
16417
16417
  var rootClassName = "".concat(this.props.rootClassName ? this.props.rootClassName : '');
16418
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: "dc__position-rel flex left cursor ".concat(rootClassName), onClick: (_a = this.props) === null || _a === void 0 ? void 0 : _a.onClick }, { children: [jsxRuntime.jsx("input", { type: "checkbox", className: 'form__checkbox', disabled: this.props.disabled, value: this.props.value, onChange: this.props.onChange, tabIndex: this.props.tabIndex, checked: this.props.isChecked, id: this.props.id, "data-testid": this.props.dataTestId }), jsxRuntime.jsx("span", { className: "form__checkbox-container" }), jsxRuntime.jsx("span", __assign({ className: "form__checkbox-label" }, { children: this.props.children }))] })) }));
16418
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: "dc__position-rel flex left cursor ".concat(rootClassName), onClick: (_a = this.props) === null || _a === void 0 ? void 0 : _a.onClick }, { children: [jsxRuntime.jsx("input", { type: "checkbox", className: 'form__checkbox', disabled: this.props.disabled, value: this.props.value, onChange: this.props.onChange, tabIndex: this.props.tabIndex, checked: this.props.isChecked, id: this.props.id, "data-testid": this.props.dataTestId }), jsxRuntime.jsx("span", { className: "form__checkbox-container", "data-testid": "".concat(this.props.dataTestId, "-chk-span") }), jsxRuntime.jsx("span", __assign({ className: "form__checkbox-label" }, { children: this.props.children }))] })) }));
16419
16419
  };
16420
16420
  return Checkbox;
16421
16421
  }(React.Component));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.7-beta-32",
3
+ "version": "0.0.7-beta-34",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -27,7 +27,7 @@ export class Checkbox extends Component<CheckboxProps> {
27
27
  id={this.props.id}
28
28
  data-testid={this.props.dataTestId}
29
29
  />
30
- <span className="form__checkbox-container"></span>
30
+ <span className="form__checkbox-container" data-testid={`${this.props.dataTestId}-chk-span`}></span>
31
31
  <span className={`form__checkbox-label`}>{this.props.children}</span>
32
32
  </label>
33
33
  </>
@@ -20,7 +20,7 @@ export class RadioGroupItem extends Component<RadioGroupItemProps> {
20
20
  checked={context.value === this.props.value}
21
21
  data-testid={this.props.dataTestId}
22
22
  />
23
- <span className="form__radio-item-content">
23
+ <span className="form__radio-item-content" data-testid={`${this.props.dataTestId}-span`}>
24
24
  <span className="radio__button"></span>
25
25
  <span className="radio__title">{this.props.children}</span>
26
26
  </span>