@devtron-labs/devtron-fe-common-lib 0.0.63-beta-4 → 0.0.63-beta-5

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.
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { BulkSelectionDropdownItemsProps } from './types';
3
- declare const BulkSelectionDropdownItems: <T>({ locator, label, isSelected, handleBulkSelection, icon: Icon, }: BulkSelectionDropdownItemsProps<T>) => JSX.Element;
3
+ declare const BulkSelectionDropdownItems: <T>({ locator, label, isSelected, handleBulkSelection, icon: Icon, iconClass, }: BulkSelectionDropdownItemsProps<T>) => JSX.Element;
4
4
  export default BulkSelectionDropdownItems;
@@ -34,6 +34,7 @@ export interface BulkSelectionDropdownItemsType {
34
34
  label: string;
35
35
  isSelected: boolean;
36
36
  icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
37
+ iconClass?: string;
37
38
  }
38
39
  export interface BulkSelectionDropdownItemsProps<T> extends BulkSelectionDropdownItemsType, Pick<UseBulkSelectionReturnType<T>, 'handleBulkSelection'> {
39
40
  }
package/dist/index.js CHANGED
@@ -28771,7 +28771,7 @@ function CustomInput(_a) {
28771
28771
  return (jsxRuntime.jsx("label", __assign({ className: "form__label ".concat(labelClassName), "data-testid": "label-".concat(dataTestid) }, { children: renderInputLabelConditionally() })));
28772
28772
  }
28773
28773
  };
28774
- return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top ".concat(inputWrapClassName) }, { children: [renderInputLabel(), jsxRuntime.jsx("input", __assign({ "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input fs-13 ".concat(rootClassName), onChange: function (e) {
28774
+ return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top ".concat(inputWrapClassName) }, { children: [renderInputLabel(), jsxRuntime.jsx("input", __assign({ "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input fs-13 lh-20 fw-4 ".concat(rootClassName), onChange: function (e) {
28775
28775
  e.persist();
28776
28776
  onChange(e);
28777
28777
  }, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex, autoFocus: autoFocus, readOnly: readOnly, ref: ref, onKeyPress: onKeyPress, defaultValue: defaultValue, onKeyDown: onKeyDown, required: required }, inputProps)), getInputError(), helperText && (jsxRuntime.jsxs("div", __assign({ className: "form__text-field-info" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon form__icon--info" }), jsxRuntime.jsx("p", __assign({ className: "sentence-case" }, { children: helperText }))] })))] })));
@@ -29429,7 +29429,7 @@ var SelectOption = function (props) {
29429
29429
  };
29430
29430
 
29431
29431
  var BulkSelectionDropdownItems = function (_a) {
29432
- var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon;
29432
+ var locator = _a.locator, label = _a.label, isSelected = _a.isSelected, handleBulkSelection = _a.handleBulkSelection, Icon = _a.icon, iconClass = _a.iconClass;
29433
29433
  var handleSelect = function () {
29434
29434
  handleBulkSelection({
29435
29435
  action: locator,
@@ -29437,7 +29437,7 @@ var BulkSelectionDropdownItems = function (_a) {
29437
29437
  };
29438
29438
  return (jsxRuntime.jsxs("button", __assign({ "data-testid": "bulk-action-".concat(locator), onClick: handleSelect, className: "dc__no-border dc__outline-none-imp w-100 flexbox h-32 dc__align-items-center pt-6 pr-8 pb-6 pl-8 dc__gap-8 ".concat(isSelected
29439
29439
  ? 'cb-5 bcb-1 icon-stroke-b5 fs-13 fw-6 lh-20'
29440
- : 'dc__no-background cn-9 fs-13 fw-4 lh-20 dc__hover-n50'), type: "button" }, { children: [jsxRuntime.jsx(Icon, { className: "icon-dim-16" }), label] })));
29440
+ : 'dc__no-background cn-9 fs-13 fw-4 lh-20 dc__hover-n50'), type: "button" }, { children: [jsxRuntime.jsx(Icon, { className: "icon-dim-16 ".concat(iconClass || '') }), label] })));
29441
29441
  };
29442
29442
 
29443
29443
  exports.BulkSelectionEvents = void 0;
@@ -29703,10 +29703,11 @@ var BulkSelection = function (_a) {
29703
29703
  label: BulkSelectionOptionsLabels[exports.BulkSelectionEvents.CLEAR_ALL_SELECTIONS],
29704
29704
  isSelected: false,
29705
29705
  icon: SvgIcClose,
29706
+ iconClass: 'icon-use-fill-n6',
29706
29707
  },
29707
29708
  ]
29708
29709
  : [])), false);
29709
- return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true }, { children: [jsxRuntime.jsxs(PopupMenu.Button, __assign({ isKebab: true, rootClassName: "h-20 flexbox p-0 dc__no-background dc__no-border dc__outline-none-imp", dataTestId: BULK_DROPDOWN_TEST_ID }, { children: [jsxRuntime.jsx(Checkbox$1, { isChecked: isChecked, onChange: noop$1, rootClassName: "icon-dim-20 m-0", value: checkboxValue }), jsxRuntime.jsx(SvgIcChevronDown, { className: "icon-dim-20 fcn-6 dc__no-shrink" })] })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "dc__top-22 w-150 dc__right-0 pt-4 pb-4 pl-0 pr-0 bcn-0 flex column dc__content-start dc__align-start dc__position-abs bcn-0 dc__border dc__border-radius-4-imp" }, { children: BulkSelectionItems.map(function (item) { return (jsxRuntime.jsx(BulkSelectionDropdownItems, { locator: item.locator, label: item.label, isSelected: item.isSelected, icon: item.icon, handleBulkSelection: handleBulkSelection }, item.locator)); }) }))] })));
29710
+ return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true }, { children: [jsxRuntime.jsxs(PopupMenu.Button, __assign({ isKebab: true, rootClassName: "h-20 flexbox p-0 dc__no-background dc__no-border dc__outline-none-imp", dataTestId: BULK_DROPDOWN_TEST_ID }, { children: [jsxRuntime.jsx(Checkbox$1, { isChecked: isChecked, onChange: noop$1, rootClassName: "icon-dim-20 m-0", value: checkboxValue }), jsxRuntime.jsx(SvgIcChevronDown, { className: "icon-dim-20 fcn-6 dc__no-shrink" })] })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "dc__top-22 w-150 dc__right-0 pt-4 pb-4 pl-0 pr-0 bcn-0 flex column dc__content-start dc__align-start dc__position-abs bcn-0 dc__border dc__border-radius-4-imp" }, { children: BulkSelectionItems.map(function (item) { return (jsxRuntime.jsx(BulkSelectionDropdownItems, { locator: item.locator, label: item.label, isSelected: item.isSelected, icon: item.icon, handleBulkSelection: handleBulkSelection, iconClass: item.iconClass }, item.locator)); }) }))] })));
29710
29711
  };
29711
29712
 
29712
29713
  var FilterChip = function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.63-beta-4",
3
+ "version": "0.0.63-beta-5",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -101,7 +101,7 @@ export function CustomInput({
101
101
  type={type}
102
102
  name={name}
103
103
  autoComplete={autoComplete}
104
- className={`form__input fs-13 ${rootClassName}`}
104
+ className={`form__input fs-13 lh-20 fw-4 ${rootClassName}`}
105
105
  onChange={(e) => {
106
106
  e.persist()
107
107
  onChange(e)
@@ -35,6 +35,7 @@ const BulkSelection = <T,>({ showPagination }: BulkSelectionProps) => {
35
35
  label: BulkSelectionOptionsLabels[BulkSelectionEvents.CLEAR_ALL_SELECTIONS],
36
36
  isSelected: false,
37
37
  icon: ICClose,
38
+ iconClass: 'icon-use-fill-n6',
38
39
  },
39
40
  ]
40
41
  : []),
@@ -67,6 +68,7 @@ const BulkSelection = <T,>({ showPagination }: BulkSelectionProps) => {
67
68
  isSelected={item.isSelected}
68
69
  icon={item.icon}
69
70
  handleBulkSelection={handleBulkSelection}
71
+ iconClass={item.iconClass}
70
72
  />
71
73
  ))}
72
74
  </PopupMenu.Body>
@@ -6,6 +6,7 @@ const BulkSelectionDropdownItems = <T,>({
6
6
  isSelected,
7
7
  handleBulkSelection,
8
8
  icon: Icon,
9
+ iconClass,
9
10
  }: BulkSelectionDropdownItemsProps<T>) => {
10
11
  const handleSelect = () => {
11
12
  handleBulkSelection({
@@ -24,7 +25,7 @@ const BulkSelectionDropdownItems = <T,>({
24
25
  }`}
25
26
  type="button"
26
27
  >
27
- <Icon className="icon-dim-16" />
28
+ <Icon className={`icon-dim-16 ${iconClass || ''}`} />
28
29
  {label}
29
30
  </button>
30
31
  )
@@ -39,6 +39,7 @@ export interface BulkSelectionDropdownItemsType {
39
39
  label: string
40
40
  isSelected: boolean
41
41
  icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
42
+ iconClass?: string
42
43
  }
43
44
 
44
45
  export interface BulkSelectionDropdownItemsProps<T>