@devtron-labs/devtron-fe-common-lib 0.0.21 → 0.0.23-beta-1

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.
@@ -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
@@ -14597,10 +14597,11 @@ function TippyCustomized(props) {
14597
14597
  setShowHeadingInfo(not);
14598
14598
  };
14599
14599
  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
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, hideHeading = props.hideHeading, infoText = props.infoText, showCloseButton = props.showCloseButton, additionalContent = props.additionalContent, documentationLink = props.documentationLink, documentationLinkText = props.documentationLinkText;
14601
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!hideHeading &&
14602
+ jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme
14603
+ ? "p-12 cn-9 ".concat(props.noHeadingBorder ? '' : 'dc__border-bottom-n1')
14604
+ : '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
14605
  ? 'p-12'
14605
14606
  : "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
14607
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.21",
3
+ "version": "0.0.23-beta-1",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -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>>