@capillarytech/blaze-ui 6.5.0 → 6.6.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.
Files changed (121) hide show
  1. package/CapAdvancedIcon/types.d.ts +1 -0
  2. package/CapAdvancedIcon/types.d.ts.map +1 -1
  3. package/CapDnDGraph/index.js +2 -2
  4. package/CapDndGraphSidebar/SideBarIcon.d.ts +3 -23
  5. package/CapDndGraphSidebar/SideBarIcon.d.ts.map +1 -1
  6. package/CapDndGraphSidebar/SideBarIcon.js +21 -39
  7. package/CapDndGraphSidebar/SidebarNodesRendered.d.ts +3 -9
  8. package/CapDndGraphSidebar/SidebarNodesRendered.d.ts.map +1 -1
  9. package/CapDndGraphSidebar/SidebarNodesRendered.js +13 -4
  10. package/CapDndGraphSidebar/index.d.ts +4 -20
  11. package/CapDndGraphSidebar/index.d.ts.map +1 -1
  12. package/CapDndGraphSidebar/index.js +31 -33
  13. package/CapDndGraphSidebar/styles.css +20 -6
  14. package/CapDndGraphSidebar/styles.module.scss.js +15 -0
  15. package/CapDndGraphSidebar/styles.scss +69 -51
  16. package/CapDndGraphSidebar/types.d.ts +106 -0
  17. package/CapDndGraphSidebar/types.d.ts.map +1 -0
  18. package/CapDragAndDrop/index.d.ts +3 -19
  19. package/CapDragAndDrop/index.d.ts.map +1 -1
  20. package/CapDragAndDrop/index.js +24 -29
  21. package/CapDragAndDrop/messages.d.ts +25 -0
  22. package/CapDragAndDrop/messages.d.ts.map +1 -0
  23. package/CapDragAndDrop/messages.js +28 -0
  24. package/CapDragAndDrop/styles.css +17 -15
  25. package/CapDragAndDrop/styles.module.scss.js +21 -0
  26. package/CapDragAndDrop/styles.scss +18 -16
  27. package/CapDragAndDrop/types.d.ts +17 -0
  28. package/CapDragAndDrop/types.d.ts.map +1 -0
  29. package/CapDragAndDrop/types.js +1 -0
  30. package/CapIcon/index.js +12 -12
  31. package/CapIcon/styles.css +17 -21
  32. package/CapIcon/styles.module.scss.js +3 -4
  33. package/CapIcon/styles.scss +10 -15
  34. package/CapMediaPreview/ImageRenderer.d.ts +2 -15
  35. package/CapMediaPreview/ImageRenderer.d.ts.map +1 -1
  36. package/CapMediaPreview/ImageRenderer.js +3 -11
  37. package/CapMediaPreview/MediaRenderer.d.ts +2 -1
  38. package/CapMediaPreview/MediaRenderer.d.ts.map +1 -1
  39. package/CapMediaPreview/MediaRenderer.js +17 -15
  40. package/CapMediaPreview/VideoPlayer.d.ts +2 -1
  41. package/CapMediaPreview/VideoPlayer.d.ts.map +1 -1
  42. package/CapMediaPreview/VideoPlayer.js +16 -15
  43. package/CapMediaPreview/index.d.ts +4 -51
  44. package/CapMediaPreview/index.d.ts.map +1 -1
  45. package/CapMediaPreview/index.js +86 -69
  46. package/CapMediaPreview/styles.css +31 -21
  47. package/CapMediaPreview/styles.module.scss.js +24 -0
  48. package/CapMediaPreview/styles.scss +38 -27
  49. package/CapMediaPreview/types.d.ts +48 -0
  50. package/CapMediaPreview/types.d.ts.map +1 -0
  51. package/CapMediaPreview/types.js +1 -0
  52. package/CapPopoverTree/index.d.ts +40 -3
  53. package/CapPopoverTree/index.d.ts.map +1 -1
  54. package/CapPopoverTree/index.js +82 -72
  55. package/CapPopoverTree/style.d.ts +1 -5
  56. package/CapPopoverTree/style.d.ts.map +1 -1
  57. package/CapPopoverTree/styles.css +18 -119
  58. package/CapPopoverTree/styles.scss +31 -179
  59. package/CapSelectFilter/types.d.ts +1 -1
  60. package/CapSelectFilter/types.d.ts.map +1 -1
  61. package/CapTimeline/CapTimelineCard.d.ts +4 -27
  62. package/CapTimeline/CapTimelineCard.d.ts.map +1 -1
  63. package/CapTimeline/CapTimelineCard.js +40 -157
  64. package/CapTimeline/CapTimelinePanesWrapper.d.ts +4 -25
  65. package/CapTimeline/CapTimelinePanesWrapper.d.ts.map +1 -1
  66. package/CapTimeline/CapTimelinePanesWrapper.js +24 -20
  67. package/CapTimeline/index.d.ts +2 -17
  68. package/CapTimeline/index.d.ts.map +1 -1
  69. package/CapTimeline/index.js +62 -23
  70. package/CapTimeline/messages.d.ts +21 -0
  71. package/CapTimeline/messages.d.ts.map +1 -0
  72. package/CapTimeline/messages.js +24 -0
  73. package/CapTimeline/styles.css +40 -40
  74. package/CapTimeline/styles.module.scss.js +30 -0
  75. package/CapTimeline/styles.scss +76 -57
  76. package/CapTimeline/tests/CapTimeline.mockData.d.ts +14 -0
  77. package/CapTimeline/tests/CapTimeline.mockData.d.ts.map +1 -0
  78. package/CapTimeline/types.d.ts +60 -0
  79. package/CapTimeline/types.d.ts.map +1 -0
  80. package/CapTimeline/types.js +1 -0
  81. package/index.d.ts +8 -0
  82. package/index.d.ts.map +1 -1
  83. package/index.js +179 -171
  84. package/package.json +2 -2
  85. package/utils/getCapThemeConfig.d.ts +1 -1
  86. package/utils/getCapThemeConfig.d.ts.map +1 -1
  87. package/utils/getCapThemeConfig.js +9 -1
  88. package/CapPopoverTree/styles.module.scss.js +0 -26
  89. package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts +0 -22
  90. package/CapPopoverTree/tests/CapPopoverTree.mockData.d.ts.map +0 -1
  91. package/CapPopoverTree/types.d.ts +0 -62
  92. package/CapPopoverTree/types.d.ts.map +0 -1
  93. package/CapVirtualSelect/actions.d.ts +0 -16
  94. package/CapVirtualSelect/actions.d.ts.map +0 -1
  95. package/CapVirtualSelect/actions.js +0 -21
  96. package/CapVirtualSelect/constants.d.ts +0 -13
  97. package/CapVirtualSelect/constants.d.ts.map +0 -1
  98. package/CapVirtualSelect/constants.js +0 -26
  99. package/CapVirtualSelect/index.d.ts +0 -169
  100. package/CapVirtualSelect/index.d.ts.map +0 -1
  101. package/CapVirtualSelect/index.js +0 -409
  102. package/CapVirtualSelect/messages.d.ts +0 -9
  103. package/CapVirtualSelect/messages.d.ts.map +0 -1
  104. package/CapVirtualSelect/messages.js +0 -12
  105. package/CapVirtualSelect/reducer.d.ts +0 -4
  106. package/CapVirtualSelect/reducer.d.ts.map +0 -1
  107. package/CapVirtualSelect/reducer.js +0 -63
  108. package/CapVirtualSelect/saga.d.ts +0 -40
  109. package/CapVirtualSelect/saga.d.ts.map +0 -1
  110. package/CapVirtualSelect/saga.js +0 -91
  111. package/CapVirtualSelect/selectors.d.ts +0 -28
  112. package/CapVirtualSelect/selectors.d.ts.map +0 -1
  113. package/CapVirtualSelect/selectors.js +0 -30
  114. package/CapVirtualSelect/styles.css +0 -110
  115. package/CapVirtualSelect/styles.scss +0 -106
  116. package/CapVirtualSelect/tests/mockData.d.ts +0 -7
  117. package/CapVirtualSelect/tests/mockData.d.ts.map +0 -1
  118. package/CapVirtualSelect/utils.d.ts +0 -2
  119. package/CapVirtualSelect/utils.d.ts.map +0 -1
  120. package/CapVirtualSelect/utils.js +0 -12
  121. /package/{CapPopoverTree → CapDndGraphSidebar}/types.js +0 -0
@@ -27,6 +27,7 @@ export interface BackgroundProps extends React.HTMLAttributes<HTMLSpanElement> {
27
27
  backgroundColor?: string;
28
28
  className?: string;
29
29
  style?: React.CSSProperties;
30
+ opacity?: number;
30
31
  }
31
32
  export type StoreUploadStatusIndicator = React.ReactElement | null;
32
33
  export interface CapAdvancedIconProps {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapAdvancedIcon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC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AyB,CAAC,EAAE,OAAO,CAAC;IACpC,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
@@ -11,7 +11,7 @@ import { useDrop } from "react-dnd";
11
11
  import { createRoot } from "react-dom/client";
12
12
  import { IntlProvider } from "react-intl";
13
13
  import CapBorderedBox from "../CapBorderedBox/index.js";
14
- import CapIconsSidebar from "../CapDndGraphSidebar/index.js";
14
+ import { CapDndGraphSidebar } from "../CapDndGraphSidebar/index.js";
15
15
  import CapHeadingWithStatic from "../CapHeading/index.js";
16
16
  import CapIcon from "../CapIcon/index.js";
17
17
  import CapLabelWithStatic from "../CapLabel/index.js";
@@ -918,7 +918,7 @@ const CapDndGraph = (props) => {
918
918
  }, []);
919
919
  return /* @__PURE__ */ jsxs(CapRow, { className: "cap-graph-builder", style: { height: "calc(100vh - 120px)" }, children: [
920
920
  /* @__PURE__ */ jsx(
921
- CapIconsSidebar,
921
+ CapDndGraphSidebar,
922
922
  {
923
923
  ...sidebarProps,
924
924
  onDropOutsideCanvas: onDrop,
@@ -1,25 +1,5 @@
1
- import PropTypes from 'prop-types';
2
- declare const SideBarIcon: {
3
- ({ childNode, color, isNodeDraggable, viewMode, onDropOutsideCanvas, showModel, setShowModel, }: {
4
- childNode: any;
5
- color: any;
6
- isNodeDraggable: any;
7
- viewMode: any;
8
- onDropOutsideCanvas: any;
9
- showModel: any;
10
- setShowModel: any;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- propTypes: {
13
- childNode: PropTypes.Requireable<object>;
14
- color: PropTypes.Requireable<string>;
15
- isNodeDraggable: PropTypes.Requireable<boolean>;
16
- viewMode: PropTypes.Requireable<boolean>;
17
- onDropOutsideCanvas: PropTypes.Requireable<(...args: any[]) => any>;
18
- };
19
- defaultProps: {
20
- viewMode: boolean;
21
- onDropOutsideCanvas: () => void;
22
- };
23
- };
1
+ import React from 'react';
2
+ import type { SideBarIconProps } from './types';
3
+ declare const SideBarIcon: React.FC<SideBarIconProps>;
24
4
  export default SideBarIcon;
25
5
  //# sourceMappingURL=SideBarIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SideBarIcon.d.ts","sourceRoot":"","sources":["../../components/CapDndGraphSidebar/SideBarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAyBnC,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;CA8FhB,CAAC;AAeF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"SideBarIcon.d.ts","sourceRoot":"","sources":["../../components/CapDndGraphSidebar/SideBarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2G3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,32 +1,20 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import PropTypes from "prop-types";
3
2
  import { useDrag } from "react-dnd";
4
- import styled from "styled-components";
5
3
  import CapAdvancedIcon from "../CapAdvancedIcon/index.js";
6
4
  import { CHANNEL_TO_ICONS_MAPPING } from "../CapDnDGraph/constants.js";
7
5
  import CapIcon from "../CapIcon/index.js";
8
6
  import CapLabelWithStatic from "../CapLabel/index.js";
9
7
  import CapModalWithHoc from "../CapModal/index.js";
10
8
  import CapTooltip from "../CapTooltip/index.js";
11
- const PremiumModel = styled(CapModalWithHoc)`
12
- .ant-modal-content {
13
- width: 33.786rem;
14
- height: 19.429rem;
15
- div.ant-modal-body {
16
- padding: 1.715rem 1.715rem 1.575rem 1.715rem;
17
- }
18
- .ant-modal-footer {
19
- display: none;
20
- }
21
- }
22
- `;
9
+ import styles from "./styles.module.scss.js";
23
10
  const SideBarIcon = ({
24
11
  childNode,
25
12
  color,
26
13
  isNodeDraggable,
27
- viewMode,
28
- onDropOutsideCanvas,
29
- showModel,
14
+ viewMode = false,
15
+ onDropOutsideCanvas = () => {
16
+ },
17
+ showModel = false,
30
18
  setShowModel
31
19
  }) => {
32
20
  const {
@@ -61,10 +49,13 @@ const SideBarIcon = ({
61
49
  {
62
50
  type,
63
51
  backgroundProps: {
64
- backgroundColor: color,
65
- opacity: viewMode || isDisabled ? 0.5 : 1
52
+ style: {
53
+ backgroundColor: color,
54
+ opacity: viewMode || isDisabled ? 0.5 : 1,
55
+ borderRadius: 18
56
+ }
66
57
  },
67
- label: /* @__PURE__ */ jsx(CapLabelWithStatic, { className: "node-label", type: "label5", children: label }),
58
+ label: /* @__PURE__ */ jsx(CapLabelWithStatic, { className: styles["node-label"], type: "label5", children: label }),
68
59
  svgProps: {
69
60
  height: "24px",
70
61
  width: "24px",
@@ -75,43 +66,34 @@ const SideBarIcon = ({
75
66
  }
76
67
  );
77
68
  const handleModel = () => {
78
- setShowModel(!showModel);
69
+ if (setShowModel) {
70
+ setShowModel(!showModel);
71
+ }
79
72
  };
80
- return /* @__PURE__ */ jsxs("div", { className: "node-container", children: [
81
- /* @__PURE__ */ jsxs("div", { className: "node-container-inner", children: [
73
+ const tooltipContent = showPremiumIcon && typeof tooltipText === "function" ? tooltipText(id, isDisabled, handleModel) : typeof tooltipText === "function" ? tooltipText(id, isDisabled, handleModel) : tooltipText;
74
+ return /* @__PURE__ */ jsxs("div", { className: styles["node-container"], children: [
75
+ /* @__PURE__ */ jsxs("div", { children: [
82
76
  tooltipText ? /* @__PURE__ */ jsx(
83
77
  CapTooltip,
84
78
  {
85
79
  placement: showPremiumIcon && isDisabled ? "right" : "top",
86
- title: showPremiumIcon ? tooltipText(id, isDisabled, handleModel) : tooltipText,
87
- children: Icon
80
+ title: tooltipContent,
81
+ children: /* @__PURE__ */ jsx("div", { children: Icon })
88
82
  }
89
83
  ) : /* @__PURE__ */ jsx(Fragment, { children: Icon }),
90
84
  showPremiumIcon && /* @__PURE__ */ jsx(CapTooltip, { title: premiumTooltipText, children: /* @__PURE__ */ jsx(
91
85
  CapIcon,
92
86
  {
93
87
  svgProps: { width: 12, height: 12 },
94
- className: "premium-icon",
88
+ className: styles["premium-icon"],
95
89
  type: "premiumColored",
96
90
  size: "s"
97
91
  }
98
92
  ) })
99
93
  ] }),
100
- showPremiumIcon && /* @__PURE__ */ jsx(PremiumModel, { visible: showModel, onCancel: handleModel, children: premiumModelContent() })
94
+ showPremiumIcon && premiumModelContent && /* @__PURE__ */ jsx(CapModalWithHoc, { open: showModel, onCancel: handleModel, className: styles["premium-modal"], children: premiumModelContent() })
101
95
  ] }, type);
102
96
  };
103
- SideBarIcon.propTypes = {
104
- childNode: PropTypes.object,
105
- color: PropTypes.string,
106
- isNodeDraggable: PropTypes.bool,
107
- viewMode: PropTypes.bool,
108
- onDropOutsideCanvas: PropTypes.func
109
- };
110
- SideBarIcon.defaultProps = {
111
- viewMode: false,
112
- onDropOutsideCanvas: () => {
113
- }
114
- };
115
97
  export {
116
98
  SideBarIcon as default
117
99
  };
@@ -1,11 +1,5 @@
1
- declare const SidebarNodesRendered: ({ nodes, isNodeDraggable, endDrag, viewMode, onDropOutsideCanvas, showModel, setShowModel, }: {
2
- nodes?: any[];
3
- isNodeDraggable: any;
4
- endDrag: any;
5
- viewMode: any;
6
- onDropOutsideCanvas: any;
7
- showModel: any;
8
- setShowModel: any;
9
- }) => import("react/jsx-runtime").JSX.Element[];
1
+ import React from 'react';
2
+ import type { SidebarNodesRenderedProps } from './types';
3
+ declare const SidebarNodesRendered: React.FC<SidebarNodesRenderedProps>;
10
4
  export default SidebarNodesRendered;
11
5
  //# sourceMappingURL=SidebarNodesRendered.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarNodesRendered.d.ts","sourceRoot":"","sources":["../../components/CapDndGraphSidebar/SidebarNodesRendered.tsx"],"names":[],"mappings":"AAUA,QAAA,MAAM,oBAAoB,GAAI;;;;;;;;CAQ7B,8CA8BG,CAAC;AAEL,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"SidebarNodesRendered.d.ts","sourceRoot":"","sources":["../../components/CapDndGraphSidebar/SidebarNodesRendered.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAIzD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA0C1D,CAAC;AAEL,eAAe,oBAAoB,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
+ import classNames from "classnames";
2
3
  import CapHeadingWithStatic from "../CapHeading/index.js";
3
4
  import CapIcon from "../CapIcon/index.js";
4
5
  import CapRow from "../CapRow/index.js";
5
6
  import CapTooltip from "../CapTooltip/index.js";
6
7
  import SideBarIcon from "./SideBarIcon.js";
8
+ import styles from "./styles.module.scss.js";
7
9
  const { CapHeadingSpan } = CapHeadingWithStatic;
8
10
  const SidebarNodesRendered = ({
9
11
  nodes = [],
@@ -15,12 +17,19 @@ const SidebarNodesRendered = ({
15
17
  setShowModel
16
18
  }) => nodes.map((node) => {
17
19
  const { title, tooltipText, children, color, key } = node;
18
- return /* @__PURE__ */ jsxs(CapRow, { className: "category-container", children: [
19
- /* @__PURE__ */ jsxs(CapRow, { className: "align-items-center", children: [
20
+ return /* @__PURE__ */ jsxs(CapRow, { className: styles["category-container"], children: [
21
+ /* @__PURE__ */ jsxs(CapRow, { className: styles["align-items-center"], children: [
20
22
  /* @__PURE__ */ jsx(CapHeadingSpan, { type: "h4", children: title }),
21
- tooltipText && /* @__PURE__ */ jsx(CapTooltip, { title: tooltipText, overlayClassName: "hide-tooltip-pointer", children: /* @__PURE__ */ jsx(CapIcon, { type: "info", className: "info-icon margin-l-4", size: "xs" }) })
23
+ tooltipText && /* @__PURE__ */ jsx(CapTooltip, { title: tooltipText, classNames: { root: styles["hide-tooltip-pointer"] }, children: /* @__PURE__ */ jsx(
24
+ CapIcon,
25
+ {
26
+ type: "info",
27
+ className: classNames(styles["info-icon"], styles["margin-l-4"]),
28
+ size: "xs"
29
+ }
30
+ ) })
22
31
  ] }),
23
- /* @__PURE__ */ jsx(CapRow, { className: "icons-container", children: children.map((childNode) => /* @__PURE__ */ jsx(
32
+ /* @__PURE__ */ jsx(CapRow, { className: styles["icons-container"], children: children.map((childNode) => /* @__PURE__ */ jsx(
24
33
  SideBarIcon,
25
34
  {
26
35
  childNode,
@@ -1,22 +1,6 @@
1
- import PropTypes from 'prop-types';
2
1
  import React from 'react';
3
- import './styles.scss';
4
- export declare const CapDndGraphSidebar: {
5
- (props: any): import("react/jsx-runtime").JSX.Element;
6
- propTypes: {
7
- nodes: PropTypes.Requireable<object>;
8
- sidebarTitle: PropTypes.Requireable<string>;
9
- sidebarDescription: PropTypes.Requireable<string>;
10
- sidebarTitleInfo: PropTypes.Requireable<string>;
11
- isNodeDraggable: PropTypes.Requireable<boolean>;
12
- endDrag: PropTypes.Requireable<object>;
13
- viewMode: PropTypes.Requireable<boolean>;
14
- onDropOutsideCanvas: PropTypes.Requireable<(...args: any[]) => any>;
15
- };
16
- defaultProps: {
17
- viewMode: boolean;
18
- };
19
- };
20
- declare const _default: React.ComponentType<Omit<any, "intl">>;
21
- export default _default;
2
+ import type { CapDndGraphSidebarProps } from './types';
3
+ export declare const CapDndGraphSidebar: React.FC<CapDndGraphSidebarProps>;
4
+ export default CapDndGraphSidebar;
5
+ export type { CapDndGraphSidebarProps } from './types';
22
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDndGraphSidebar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,OAAO,eAAe,CAAC;AAIvB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAyC9B,CAAC;;AAiBF,wBAA4E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDndGraphSidebar/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIvD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+ChE,CAAC;AAEF,eAAe,kBAAkB,CAAC;AAClC,YAAY,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,33 +1,45 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import PropTypes from "prop-types";
2
+ import classNames from "classnames";
3
3
  import { useState } from "react";
4
4
  import CapHeadingWithStatic from "../CapHeading/index.js";
5
5
  import CapIcon from "../CapIcon/index.js";
6
6
  import CapLabelWithStatic from "../CapLabel/index.js";
7
7
  import CapRow from "../CapRow/index.js";
8
8
  import CapTooltip from "../CapTooltip/index.js";
9
- import LocaleHoc from "../LocaleHoc/index.js";
10
9
  import SidebarNodesRendered from "./SidebarNodesRendered.js";
11
- import './styles.css';/* empty css */
10
+ import styles from "./styles.module.scss.js";
12
11
  const { CapHeadingSpan } = CapHeadingWithStatic;
13
- const CapDndGraphSidebar = (props) => {
14
- const {
15
- nodes = [],
16
- sidebarTitle,
17
- sidebarDescription,
18
- sidebarTitleInfo,
19
- isNodeDraggable,
20
- endDrag,
21
- viewMode,
22
- onDropOutsideCanvas
23
- } = props;
12
+ const CapDndGraphSidebar = ({
13
+ nodes = [],
14
+ sidebarTitle,
15
+ sidebarDescription,
16
+ sidebarTitleInfo,
17
+ isNodeDraggable,
18
+ endDrag,
19
+ viewMode = false,
20
+ onDropOutsideCanvas
21
+ }) => {
24
22
  const [showModel, setShowModel] = useState(false);
25
- return /* @__PURE__ */ jsxs(CapRow, { className: "dnd-graph-sidebar-container", children: [
26
- sidebarTitle && /* @__PURE__ */ jsxs(CapRow, { className: "align-items-center", children: [
23
+ return /* @__PURE__ */ jsxs(CapRow, { className: styles["dnd-graph-sidebar-container"], children: [
24
+ sidebarTitle && /* @__PURE__ */ jsxs(CapRow, { className: styles["align-items-center"], children: [
27
25
  /* @__PURE__ */ jsx(CapHeadingSpan, { type: "h3", children: sidebarTitle }),
28
- sidebarTitleInfo && /* @__PURE__ */ jsx(CapTooltip, { title: sidebarTitleInfo, overlayClassName: "hide-tooltip-pointer", children: /* @__PURE__ */ jsx(CapIcon, { type: "info", className: "info-icon margin-l-4", size: "xs" }) })
26
+ sidebarTitleInfo && /* @__PURE__ */ jsx(
27
+ CapTooltip,
28
+ {
29
+ title: sidebarTitleInfo,
30
+ classNames: { root: styles["hide-tooltip-pointer"] },
31
+ children: /* @__PURE__ */ jsx(
32
+ CapIcon,
33
+ {
34
+ type: "info",
35
+ className: classNames(styles["info-icon"], styles["margin-l-4"]),
36
+ size: "xs"
37
+ }
38
+ )
39
+ }
40
+ )
29
41
  ] }),
30
- sidebarDescription && /* @__PURE__ */ jsx(CapLabelWithStatic, { type: "label3", className: "margin-t-4", children: sidebarDescription }),
42
+ sidebarDescription && /* @__PURE__ */ jsx(CapLabelWithStatic, { type: "label3", className: styles["margin-t-4"], children: sidebarDescription }),
31
43
  /* @__PURE__ */ jsx(
32
44
  SidebarNodesRendered,
33
45
  {
@@ -42,21 +54,7 @@ const CapDndGraphSidebar = (props) => {
42
54
  )
43
55
  ] });
44
56
  };
45
- CapDndGraphSidebar.propTypes = {
46
- nodes: PropTypes.object,
47
- sidebarTitle: PropTypes.string,
48
- sidebarDescription: PropTypes.string,
49
- sidebarTitleInfo: PropTypes.string,
50
- isNodeDraggable: PropTypes.bool,
51
- endDrag: PropTypes.object,
52
- viewMode: PropTypes.bool,
53
- onDropOutsideCanvas: PropTypes.func
54
- };
55
- CapDndGraphSidebar.defaultProps = {
56
- viewMode: false
57
- };
58
- const CapIconsSidebar = LocaleHoc(CapDndGraphSidebar, { key: "CapDndGraphSidebar" });
59
57
  export {
60
58
  CapDndGraphSidebar,
61
- CapIconsSidebar as default
59
+ CapDndGraphSidebar as default
62
60
  };
@@ -8,26 +8,37 @@
8
8
  /* Timezones Footer */
9
9
  .dnd-graph-sidebar-container {
10
10
  background: #fafbfc;
11
- width: 240px;
11
+ width: 17.143rem;
12
12
  height: 100%;
13
13
  display: inline-block;
14
- padding: 15px 1.714rem;
14
+ padding: 1.071rem 1.714rem;
15
15
  overflow: auto;
16
16
  }
17
- .dnd-graph-sidebar-container .title-row {
17
+ .dnd-graph-sidebar-container .align-items-center {
18
18
  display: flex;
19
+ align-items: center;
20
+ }
21
+ .dnd-graph-sidebar-container .margin-l-4 {
22
+ margin-left: 0.285rem;
23
+ }
24
+ .dnd-graph-sidebar-container .margin-t-4 {
25
+ margin-top: 0.285rem;
19
26
  }
20
- .dnd-graph-sidebar-container .title-row .info-icon {
27
+ .dnd-graph-sidebar-container .info-icon {
21
28
  display: flex;
22
29
  align-items: center;
23
- margin-left: 0.285rem;
30
+ }
31
+ .dnd-graph-sidebar-container .title-row {
32
+ display: flex;
24
33
  }
25
34
  .dnd-graph-sidebar-container .category-container {
35
+ display: block;
26
36
  margin: 1.142rem 0;
27
37
  }
28
38
  .dnd-graph-sidebar-container .category-container .icons-container {
29
39
  display: flex;
30
40
  flex-wrap: wrap;
41
+ width: 100%;
31
42
  }
32
43
  .dnd-graph-sidebar-container .category-container .icons-container .node-container {
33
44
  width: 33.3333333333%;
@@ -36,7 +47,7 @@
36
47
  position: relative;
37
48
  }
38
49
  .dnd-graph-sidebar-container .category-container .icons-container .node-container .cap-icon-background {
39
- padding: 9px;
50
+ padding: 0.643rem;
40
51
  }
41
52
  .dnd-graph-sidebar-container .category-container .icons-container .node-container .node-label {
42
53
  white-space: nowrap;
@@ -52,4 +63,7 @@
52
63
  padding: 0.125rem;
53
64
  background-color: #ffffff;
54
65
  border-radius: 50%;
66
+ }
67
+ .dnd-graph-sidebar-container .category-container .icons-container .node-container .cap-tooltip-wrapper {
68
+ display: block;
55
69
  }
@@ -0,0 +1,15 @@
1
+ import './styles.css';const styles = {
2
+ "dnd-graph-sidebar-container": "dnd-graph-sidebar-container",
3
+ "align-items-center": "align-items-center",
4
+ "margin-l-4": "margin-l-4",
5
+ "margin-t-4": "margin-t-4",
6
+ "info-icon": "info-icon",
7
+ "category-container": "category-container",
8
+ "icons-container": "icons-container",
9
+ "node-container": "node-container",
10
+ "node-label": "node-label",
11
+ "premium-icon": "premium-icon"
12
+ };
13
+ export {
14
+ styles as default
15
+ };
@@ -1,57 +1,75 @@
1
1
  @import '../styles/_variables.scss';
2
2
 
3
- .dnd-graph-sidebar-container{
4
- background: $CAP_G10;
5
- width: 240px;
6
- height: 100%;
7
- display: inline-block;
8
- padding: 15px $CAP_SPACE_24;
9
- overflow: auto;
10
-
11
- .title-row {
12
- display: flex;
13
-
14
- .info-icon {
15
- display: flex;
16
- align-items: center;
17
- margin-left: $CAP_SPACE_04;
3
+ .dnd-graph-sidebar-container {
4
+ background: $CAP_G10;
5
+ width: 17.143rem;
6
+ height: 100%;
7
+ display: inline-block;
8
+ padding: 1.071rem $CAP_SPACE_24;
9
+ overflow: auto;
10
+
11
+ .align-items-center {
12
+ display: flex;
13
+ align-items: center;
14
+ }
15
+
16
+ .margin-l-4 {
17
+ margin-left: $CAP_SPACE_04;
18
+ }
19
+
20
+ .margin-t-4 {
21
+ margin-top: $CAP_SPACE_04;
22
+ }
23
+
24
+ .info-icon {
25
+ display: flex;
26
+ align-items: center;
27
+ }
28
+
29
+ .title-row {
30
+ display: flex;
31
+ }
32
+
33
+ .category-container {
34
+ display: block;
35
+ margin: $CAP_SPACE_16 0;
36
+
37
+ .icons-container {
38
+ display: flex;
39
+ flex-wrap: wrap;
40
+ width: 100%;
41
+
42
+ .node-container {
43
+ width: calc(100% / 3);
44
+ text-align: center;
45
+ margin: $CAP_SPACE_04 0;
46
+ position: relative;
47
+
48
+ .cap-icon-background {
49
+ padding: 0.643rem;
50
+ }
51
+
52
+ .node-label {
53
+ white-space: nowrap;
54
+ align-items: center;
55
+ display: inline-block;
56
+ white-space: normal;
57
+ }
58
+
59
+ .premium-icon {
60
+ position: absolute;
61
+ top: -0.313rem;
62
+ right: 0.25rem;
63
+ z-index: 99;
64
+ padding: 0.125rem;
65
+ background-color: $CAP_WHITE;
66
+ border-radius: 50%;
18
67
  }
19
- }
20
68
 
21
- .category-container {
22
- margin: $CAP_SPACE_16 0;
23
-
24
- .icons-container {
25
- display: flex;
26
- flex-wrap: wrap;
27
-
28
- .node-container {
29
- width: calc(100% / 3);
30
- text-align: center;
31
- margin: $CAP_SPACE_04 0;
32
- position: relative;
33
-
34
- .cap-icon-background {
35
- padding: 9px;
36
- }
37
-
38
- .node-label {
39
- white-space: nowrap;
40
- align-items: center;
41
- display: inline-block;
42
- white-space: normal;
43
- }
44
-
45
- .premium-icon {
46
- position: absolute;
47
- top: -0.313rem;
48
- right: 0.25rem;
49
- z-index: 99;
50
- padding: 0.125rem;
51
- background-color: $CAP_WHITE;
52
- border-radius: 50%;
53
- }
54
- }
69
+ :global(.cap-tooltip-wrapper) {
70
+ display: block;
55
71
  }
72
+ }
56
73
  }
57
- }
74
+ }
75
+ }