@devtron-labs/devtron-fe-common-lib 0.0.21-beta-2 → 0.0.22

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.
@@ -42,5 +42,4 @@ export declare function CustomInput({ name, value, error, onChange, onBlur, onFo
42
42
  }): JSX.Element;
43
43
  export declare function handleUTCTime(ts: string, isRelativeTime?: boolean): string;
44
44
  export declare function useSearchString(): UseSearchString;
45
- export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) => void;
46
45
  export {};
@@ -50,6 +50,7 @@ export interface TippyCustomizedProps {
50
50
  headingInfo?: ReactNode | string;
51
51
  noHeadingBorder?: boolean;
52
52
  infoTextHeading?: string;
53
+ hideHeading?: boolean;
53
54
  placement: Placement;
54
55
  className?: string;
55
56
  Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
package/dist/index.js CHANGED
@@ -10094,12 +10094,7 @@ function useSearchString() {
10094
10094
  return agg;
10095
10095
  }, {});
10096
10096
  return { queryParams: queryParams, searchParams: searchParams };
10097
- }
10098
- var closeOnEscKeyPressed = function (e, actionClose) {
10099
- if (e.keyCode === 27 || e.key === 'Escape') {
10100
- actionClose();
10101
- }
10102
- };
10097
+ }
10103
10098
 
10104
10099
  function Progressing(_a) {
10105
10100
  var pageLoader = _a.pageLoader, size = _a.size, theme = _a.theme, styles = _a.styles, fillColor = _a.fillColor;
@@ -14597,10 +14592,11 @@ function TippyCustomized(props) {
14597
14592
  setShowHeadingInfo(not);
14598
14593
  };
14599
14594
  var getTippyContent = function () {
14600
- var Icon = props.Icon, iconPath = props.iconPath, iconClass = props.iconClass, iconSize = props.iconSize, onImageLoadError = props.onImageLoadError, heading = props.heading, headingInfo = props.headingInfo, infoTextHeading = props.infoTextHeading, infoText = props.infoText, showCloseButton = props.showCloseButton, additionalContent = props.additionalContent, documentationLink = props.documentationLink, documentationLinkText = props.documentationLinkText;
14601
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme
14602
- ? "p-12 cn-9 ".concat(props.noHeadingBorder ? '' : 'dc__border-bottom-n1')
14603
- : 'pt-20 pb-12 pr-20 pl-20 cn-0 top') }, { children: [iconPath ? (jsxRuntime.jsx("img", { className: "icon-dim-".concat(iconSize || 20, " mr-6 ").concat(iconClass || ''), src: iconPath, alt: "Heading", onError: onImageLoadError })) : (Icon && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-".concat(iconSize || 20, " mr-6") }, { children: jsxRuntime.jsx(Icon, { className: "icon-dim-".concat(iconSize || 20, " ").concat(iconClass || '') }) })))), heading && jsxRuntime.jsx("span", __assign({ className: "fs-14 fw-6 lh-20 ".concat(showCloseButton ? 'mr-6' : '') }, { children: heading })), headingInfo && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 cursor", onClick: toggleHeadingInfo }, { children: jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-20" }) }))), showCloseButton && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-16 ml-auto" }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-16 cursor ".concat(isWhiteTheme ? 'fcn-9' : 'fcn-0'), onClick: closeTippy }) })))] })), showHeadingInfo && (jsxRuntime.jsxs("div", __assign({ className: "flex left top bcv-1 fs-13 fw-4 lh-20 pt-8 pb-8 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: [jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 mr-8" }, { children: jsxRuntime.jsx(SvgIcHelp, { className: "icon-dim-20 fcv-5" }) })), jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto" }, { children: headingInfo }))] }))), infoTextHeading && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-14 fw-6 lh-20 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: infoTextHeading }))), infoText && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-13 fw-4 lh-20 ".concat(isWhiteTheme
14595
+ var Icon = props.Icon, iconPath = props.iconPath, iconClass = props.iconClass, iconSize = props.iconSize, onImageLoadError = props.onImageLoadError, heading = props.heading, headingInfo = props.headingInfo, infoTextHeading = props.infoTextHeading, hideHeading = props.hideHeading, infoText = props.infoText, showCloseButton = props.showCloseButton, additionalContent = props.additionalContent, documentationLink = props.documentationLink, documentationLinkText = props.documentationLinkText;
14596
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!hideHeading &&
14597
+ jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme
14598
+ ? "p-12 cn-9 ".concat(props.noHeadingBorder ? '' : 'dc__border-bottom-n1')
14599
+ : 'pt-20 pb-12 pr-20 pl-20 cn-0 top') }, { children: [iconPath ? (jsxRuntime.jsx("img", { className: "icon-dim-".concat(iconSize || 20, " mr-6 ").concat(iconClass || ''), src: iconPath, alt: "Heading", onError: onImageLoadError })) : (Icon && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-".concat(iconSize || 20, " mr-6") }, { children: jsxRuntime.jsx(Icon, { className: "icon-dim-".concat(iconSize || 20, " ").concat(iconClass || '') }) })))), heading && jsxRuntime.jsx("span", __assign({ className: "fs-14 fw-6 lh-20 ".concat(showCloseButton ? 'mr-6' : '') }, { children: heading })), headingInfo && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 cursor", onClick: toggleHeadingInfo }, { children: jsxRuntime.jsx(SvgIcHelpOutline, { className: "icon-dim-20" }) }))), showCloseButton && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-16 ml-auto" }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-16 cursor ".concat(isWhiteTheme ? 'fcn-9' : 'fcn-0'), onClick: closeTippy }) })))] })), showHeadingInfo && (jsxRuntime.jsxs("div", __assign({ className: "flex left top bcv-1 fs-13 fw-4 lh-20 pt-8 pb-8 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: [jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 mr-8" }, { children: jsxRuntime.jsx(SvgIcHelp, { className: "icon-dim-20 fcv-5" }) })), jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto" }, { children: headingInfo }))] }))), infoTextHeading && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-14 fw-6 lh-20 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: infoTextHeading }))), infoText && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-13 fw-4 lh-20 ".concat(isWhiteTheme
14604
14600
  ? 'p-12'
14605
14601
  : "pl-20 pr-20 pt-4 ".concat(additionalContent && documentationLink ? 'pb-12' : 'pb-20')) }, { children: infoText }))), additionalContent, documentationLink && (jsxRuntime.jsx("div", __assign({ className: "pl-12 pb-12" }, { children: jsxRuntime.jsx("a", __assign({ href: documentationLink, target: "_blank", rel: "noreferrer noopener", className: "fs-13 cb-5", onClick: closeTippy }, { children: documentationLinkText || 'Learn more' })) })))] }));
14606
14602
  };
@@ -23414,7 +23410,6 @@ exports.TriggerTypeMap = TriggerTypeMap;
23414
23410
  exports.URLS = URLS;
23415
23411
  exports.VisibleModal = VisibleModal;
23416
23412
  exports.VisibleModal2 = VisibleModal2;
23417
- exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
23418
23413
  exports.createGitCommitUrl = createGitCommitUrl;
23419
23414
  exports.extractImage = extractImage;
23420
23415
  exports.get = get;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.21-beta-2",
3
+ "version": "0.0.22",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -369,8 +369,3 @@ export function useSearchString(): UseSearchString {
369
369
  }
370
370
 
371
371
 
372
- export const closeOnEscKeyPressed = (e: any, actionClose: () => void) => {
373
- if (e.keyCode === 27 || e.key === 'Escape') {
374
- actionClose()
375
- }
376
- }
@@ -51,6 +51,7 @@ export function TippyCustomized(props: TippyCustomizedProps) {
51
51
  heading,
52
52
  headingInfo,
53
53
  infoTextHeading,
54
+ hideHeading,
54
55
  infoText,
55
56
  showCloseButton,
56
57
  additionalContent,
@@ -59,9 +60,10 @@ export function TippyCustomized(props: TippyCustomizedProps) {
59
60
  } = props
60
61
  return (
61
62
  <>
63
+ {!hideHeading &&
62
64
  <div
63
65
  className={`dc__word-break dc__hyphens-auto flex left ${
64
- isWhiteTheme
66
+ isWhiteTheme
65
67
  ? `p-12 cn-9 ${props.noHeadingBorder ? '' : 'dc__border-bottom-n1'}`
66
68
  : 'pt-20 pb-12 pr-20 pl-20 cn-0 top'
67
69
  }`}
@@ -94,7 +96,7 @@ export function TippyCustomized(props: TippyCustomizedProps) {
94
96
  />
95
97
  </div>
96
98
  )}
97
- </div>
99
+ </div>}
98
100
  {showHeadingInfo && (
99
101
  <div
100
102
  className={`flex left top bcv-1 fs-13 fw-4 lh-20 pt-8 pb-8 ${
@@ -56,6 +56,7 @@ export interface TippyCustomizedProps {
56
56
  headingInfo?: ReactNode | string
57
57
  noHeadingBorder?: boolean
58
58
  infoTextHeading?: string
59
+ hideHeading?: boolean
59
60
  placement: Placement
60
61
  className?: string
61
62
  Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>