@capillarytech/blaze-ui 6.5.0 → 6.6.0

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 +19 -6
  14. package/CapDndGraphSidebar/styles.module.scss.js +15 -0
  15. package/CapDndGraphSidebar/styles.scss +68 -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
@@ -1,13 +1,22 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Timeline } from "antd";
3
2
  import classNames from "classnames";
4
- import PropTypes from "prop-types";
3
+ import CapIcon from "../CapIcon/index.js";
5
4
  import CapRow from "../CapRow/index.js";
5
+ import CapTooltip from "../CapTooltip/index.js";
6
+ import * as styles__variables from "../styles/_variables.js";
6
7
  import CapTimelineCard from "./CapTimelineCard.js";
7
8
  import CapTimelinePanesWrapper from "./CapTimelinePanesWrapper.js";
8
- import './styles.css';/* empty css */
9
+ import styles from "./styles.module.scss.js";
10
+ const { FONT_SIZE_M, CAP_G04, CAP_RED } = styles__variables;
11
+ const clsCardPrefix = "cap-timeline-card-v1";
9
12
  const clsPrefix = "cap-timeline-v1";
10
- const CapTimeline = ({ className, timelinePanes, activeTab, isReviewScreen, width }) => {
13
+ const CapTimeline = ({
14
+ className,
15
+ timelinePanes,
16
+ activeTab,
17
+ isReviewScreen,
18
+ width = 380
19
+ }) => {
11
20
  const { timelineLeftPaneContents, timelineRightCards } = timelinePanes.reduce(
12
21
  (accumulator, {
13
22
  milestoneHeader,
@@ -22,10 +31,37 @@ const CapTimeline = ({ className, timelinePanes, activeTab, isReviewScreen, widt
22
31
  content,
23
32
  configError,
24
33
  edited,
25
- handleClick
34
+ handleClick = () => {
35
+ }
26
36
  }, index) => {
27
- accumulator.timelineRightCards.push(
28
- /* @__PURE__ */ jsx(
37
+ const isSelected = activeTab === key;
38
+ const isLastPane = index === (timelinePanes == null ? void 0 : timelinePanes.length) - 1;
39
+ let icon;
40
+ if (disabled) {
41
+ icon = configError ? /* @__PURE__ */ jsx(CapIcon, { style: { color: CAP_RED, fontSize: FONT_SIZE_M }, type: "warning" }) : /* @__PURE__ */ jsx(
42
+ CapIcon,
43
+ {
44
+ style: { color: CAP_G04, fontSize: FONT_SIZE_M, marginTop: "1px" },
45
+ type: "exclamation-circle"
46
+ }
47
+ );
48
+ } else if (configError) {
49
+ icon = /* @__PURE__ */ jsx(CapTooltip, { title: "Warning", children: /* @__PURE__ */ jsx(CapIcon, { style: { color: CAP_RED, fontSize: FONT_SIZE_M }, type: "warning", size: "l" }) });
50
+ } else if (!complete || edited) {
51
+ icon = /* @__PURE__ */ jsx(CapTooltip, { title: "Pending", children: /* @__PURE__ */ jsx(
52
+ CapIcon,
53
+ {
54
+ style: { color: CAP_G04, fontSize: FONT_SIZE_M, marginTop: "1px" },
55
+ type: "exclamation-circle"
56
+ }
57
+ ) });
58
+ } else {
59
+ icon = /* @__PURE__ */ jsx(CapTooltip, { title: "Completed", children: /* @__PURE__ */ jsx("span", { className: styles[`${clsCardPrefix}-icon-parent`], children: /* @__PURE__ */ jsx(CapIcon, { type: "check", style: { fontSize: FONT_SIZE_M } }) }) });
60
+ }
61
+ const item = {
62
+ key,
63
+ icon,
64
+ content: /* @__PURE__ */ jsx(
29
65
  CapTimelineCard,
30
66
  {
31
67
  milestoneHeader,
@@ -37,15 +73,23 @@ const CapTimeline = ({ className, timelinePanes, activeTab, isReviewScreen, widt
37
73
  alwaysShowDescription,
38
74
  complete,
39
75
  configError,
40
- isLastPane: index === (timelinePanes == null ? void 0 : timelinePanes.length) - 1 ? true : false,
41
- width,
42
- edited,
43
76
  handleClick,
44
- isSelected: activeTab === key
45
- },
46
- key
77
+ isSelected,
78
+ isLastPane,
79
+ width
80
+ }
81
+ ),
82
+ className: classNames(
83
+ disabled ? styles[`${clsCardPrefix}-disabled-timeline-item`] : styles[`${clsCardPrefix}-enabled-timeline-item`],
84
+ isLastPane && styles[`${clsCardPrefix}-last-pane`],
85
+ !disabled && complete && styles[`${clsCardPrefix}-completed-tail`],
86
+ !disabled && configError && styles[`${clsCardPrefix}-warning-tail`],
87
+ !disabled && configError && styles[`${clsCardPrefix}-warning-card`],
88
+ !disabled && complete && !isSelected && styles[`${clsCardPrefix}-complete-head`],
89
+ !configError ? styles[`${clsCardPrefix}-division`] : styles[`${clsCardPrefix}-warning-division`]
47
90
  )
48
- );
91
+ };
92
+ accumulator.timelineRightCards.push(item);
49
93
  accumulator.timelineLeftPaneContents[key] = content;
50
94
  return accumulator;
51
95
  },
@@ -54,21 +98,16 @@ const CapTimeline = ({ className, timelinePanes, activeTab, isReviewScreen, widt
54
98
  timelineRightCards: []
55
99
  }
56
100
  );
57
- return /* @__PURE__ */ jsx(CapRow, { className, children: /* @__PURE__ */ jsx(Timeline, { className: classNames(`${clsPrefix}-body`), children: /* @__PURE__ */ jsx(
101
+ return /* @__PURE__ */ jsx(CapRow, { className, children: /* @__PURE__ */ jsx(
58
102
  CapTimelinePanesWrapper,
59
103
  {
60
104
  activeTab,
61
105
  timelineLeftPaneContents,
62
106
  timelineRightCards,
63
- isReviewScreen
107
+ isReviewScreen,
108
+ timelineClassName: styles[`${clsPrefix}-body`]
64
109
  }
65
- ) }) });
66
- };
67
- CapTimeline.propTypes = {
68
- timelinePanes: PropTypes.array,
69
- currentStep: PropTypes.string,
70
- setCurrentStep: PropTypes.func,
71
- width: PropTypes.number
110
+ ) });
72
111
  };
73
112
  export {
74
113
  CapTimeline as default
@@ -0,0 +1,21 @@
1
+ export declare const scope = "app.commonUtils.capUiLibrary.CapTimelineCard";
2
+ declare const _default: {
3
+ defaultConfiguringMessage: {
4
+ id: string;
5
+ defaultMessage: string;
6
+ };
7
+ defaultNotConfiguredMessage: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ };
11
+ toConfigure: {
12
+ id: string;
13
+ defaultMessage: string;
14
+ };
15
+ completePrevSteps: {
16
+ id: string;
17
+ defaultMessage: string;
18
+ };
19
+ };
20
+ export default _default;
21
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,iDAAiD,CAAC;;;;;;;;;;;;;;;;;;;AAEpE,wBAiBG"}
@@ -0,0 +1,24 @@
1
+ import { defineMessages } from "react-intl";
2
+ const scope = "app.commonUtils.capUiLibrary.CapTimelineCard";
3
+ const messages = defineMessages({
4
+ defaultConfiguringMessage: {
5
+ id: `${scope}.defaultConfiguringMessage`,
6
+ defaultMessage: "Configuring..."
7
+ },
8
+ defaultNotConfiguredMessage: {
9
+ id: `${scope}.defaultNotConfiguredMessage`,
10
+ defaultMessage: "Not configured yet..."
11
+ },
12
+ toConfigure: {
13
+ id: `${scope}.toConfigure`,
14
+ defaultMessage: "To configure "
15
+ },
16
+ completePrevSteps: {
17
+ id: `${scope}.completePrevSteps`,
18
+ defaultMessage: " complete the previous steps."
19
+ }
20
+ });
21
+ export {
22
+ messages as default,
23
+ scope
24
+ };
@@ -6,11 +6,8 @@
6
6
  /* Border Width */
7
7
  /* Transition */
8
8
  /* Timezones Footer */
9
- .cap-timeline-v1-body .ant-timeline-item-head-custom {
10
- top: 1.428rem;
11
- }
12
- .cap-timeline-v1-body .ant-timeline-item-tail {
13
- top: 1.857rem;
9
+ .cap-timeline-v1-body .ant-timeline-item-rail {
10
+ top: 2.1rem !important;
14
11
  }
15
12
  .cap-timeline-card-v1-pane-selected {
16
13
  background-color: #e9f0fe;
@@ -34,6 +31,7 @@
34
31
  .cap-timeline-panes-wrapper-v1-right-pane-col {
35
32
  height: 74vh;
36
33
  overflow: auto;
34
+ color: rgba(0, 0, 0, 0.65);
37
35
  }
38
36
  .cap-timeline-panes-wrapper-v1-left-pane-col {
39
37
  width: 39%;
@@ -46,17 +44,19 @@
46
44
  margin-left: 1.428rem;
47
45
  margin-right: 1.714rem;
48
46
  }
49
- .cap-timeline-panes-wrapper-v1-divider-col .cap-timeline-panes-wrapper-v1-timelinePane-divider,
50
- .cap-timeline-panes-wrapper-v1-divider-col .ant-divider ant-divider-vertical {
47
+ .cap-timeline-panes-wrapper-v1-divider-col .cap-timeline-panes-wrapper-v1-timelinePane-divider {
51
48
  margin: 0;
52
49
  }
53
- .cap-timeline-card-v1-division {
54
- margin-bottom: 0.857rem;
50
+ .ant-timeline-item.cap-timeline-card-v1-division .ant-timeline-item-icon {
51
+ border: 0.071rem solid #dfe2e7 !important;
52
+ border-radius: 50% !important;
53
+ padding: 0.214rem 0.214rem !important;
54
+ width: 1.714rem !important;
55
+ height: 1.714rem !important;
55
56
  }
56
- .cap-timeline-card-v1-division .ant-timeline-item-head {
57
- border: 0.143rem solid #dfe2e7;
58
- border-width: 0.071rem;
59
- border-radius: 50%;
57
+ .ant-timeline-item.cap-timeline-card-v1-warning-division .ant-timeline-item-icon {
58
+ border: 0.071rem solid #ea213a !important;
59
+ border-radius: 50% !important;
60
60
  padding: 0.214rem 0.214rem !important;
61
61
  width: 1.714rem !important;
62
62
  height: 1.714rem !important;
@@ -73,6 +73,7 @@
73
73
  }
74
74
  .cap-timeline-panes-wrapper-v1-pane-wrapper {
75
75
  display: flex;
76
+ flex-wrap: nowrap;
76
77
  }
77
78
  .cap-timeline-card-v1-disabled-timeline-item {
78
79
  cursor: not-allowed;
@@ -83,56 +84,55 @@
83
84
  .cap-timeline-card-v1-enabled-card:hover {
84
85
  background-color: #faf9f4;
85
86
  }
86
- .cap-timeline-card-v1-warning-card {
87
- border-color: #ea213a;
88
- }
89
87
  .cap-timeline-card-v1-icon-parent {
90
88
  border-radius: 2.857rem;
91
89
  border-color: beige;
92
90
  }
93
- .cap-timeline-card-v1-card-body .ant-card-body {
94
- padding: 0.571rem 1.142rem;
91
+ .cap-timeline-card-v1-card-body .ant-card-body,
92
+ .cap-timeline-card-v1-card-body .cap-card-wrapper .ant-card .ant-card-body {
93
+ padding: 0.571rem 1.142rem !important;
94
+ color: rgba(0, 0, 0, 0.65);
95
95
  }
96
- .cap-timeline-card-v1-last-pane .ant-timeline-item-tail {
96
+ .cap-timeline-card-v1-last-pane .ant-timeline-item-rail {
97
97
  display: none;
98
98
  }
99
- .cap-timeline-card-v1-completed-tail .ant-timeline-item-tail {
99
+ .cap-timeline-card-v1-completed-tail .ant-timeline-item-rail {
100
+ border-inline-start: 0.143rem solid #42b040;
100
101
  border-left: 0.143rem solid #42b040;
101
102
  }
102
- .cap-timeline-card-v1-warning-tail .ant-timeline-item-tail {
103
+ .cap-timeline-card-v1-warning-tail .ant-timeline-item-rail {
104
+ border-inline-start: 0.143rem solid #e8e8e8;
103
105
  border-left: 0.143rem solid #e8e8e8;
104
106
  }
105
- .cap-timeline-card-v1-complete-head .ant-timeline-item-head {
106
- border: 0.143rem solid #42b040;
107
- border-width: 0.143rem;
107
+ .ant-timeline-item.cap-timeline-card-v1-complete-head .ant-timeline-item-icon {
108
+ border: 0.143rem solid #42b040 !important;
109
+ border-radius: 50% !important;
110
+ width: 1.714rem !important;
111
+ height: 1.714rem !important;
112
+ overflow: hidden;
108
113
  }
109
114
  .cap-timeline-panes-wrapper-v1-timelinePane-divider.cap-divider-v2 {
110
115
  height: 32.857rem;
111
116
  }
112
- .cap-timeline-card-v1-warning-division {
113
- margin-bottom: 0.857rem;
114
- }
115
- .cap-timeline-card-v1-warning-division .ant-timeline-item-head {
116
- border: 0.143rem solid #ea213a;
117
- border-width: 0.071rem;
118
- border-radius: 50%;
119
- padding: 0.214rem 0.214rem !important;
120
- width: 1.714rem !important;
121
- height: 1.714rem !important;
122
- }
123
117
  .ant-timeline-item {
124
118
  padding: 0;
125
119
  }
126
120
  .ant-timeline-item .ant-timeline-item-content {
127
121
  top: 0;
128
- margin-left: 2.286rem;
129
122
  }
130
- .ant-timeline-item .ant-timeline-item-tail {
131
- left: 0.857rem;
123
+ .ant-timeline-item .ant-timeline-item-rail {
124
+ inset-inline-start: 0.857rem !important;
132
125
  }
133
- .ant-timeline-item .ant-timeline-item-head {
134
- left: 0.857rem;
126
+ .ant-timeline-item .ant-timeline-item-icon {
135
127
  display: flex;
136
128
  justify-content: center;
137
129
  align-items: center;
130
+ background-color: #ffffff;
131
+ z-index: 1;
132
+ }
133
+ .ant-timeline-item .ant-timeline-item-icon.ant-wave-target {
134
+ pointer-events: none;
135
+ }
136
+ .ant-timeline-item .ant-timeline-item-icon.ant-wave-target > * {
137
+ pointer-events: auto;
138
138
  }
@@ -0,0 +1,30 @@
1
+ import './styles.css';const styles = {
2
+ "cap-timeline-v1-body": "cap-timeline-v1-body",
3
+ "cap-timeline-card-v1-pane-selected": "cap-timeline-card-v1-pane-selected",
4
+ "cap-timeline-card-v1-card-description": "cap-timeline-card-v1-card-description",
5
+ "cap-timeline-panes-wrapper-v1-active-pane": "cap-timeline-panes-wrapper-v1-active-pane",
6
+ "cap-timeline-panes-wrapper-v1-inactive-pane": "cap-timeline-panes-wrapper-v1-inactive-pane",
7
+ "cap-timeline-panes-wrapper-v1-right-pane-content": "cap-timeline-panes-wrapper-v1-right-pane-content",
8
+ "cap-timeline-panes-wrapper-v1-left-pane-col": "cap-timeline-panes-wrapper-v1-left-pane-col",
9
+ "cap-timeline-panes-wrapper-v1-right-pane-col": "cap-timeline-panes-wrapper-v1-right-pane-col",
10
+ "cap-timeline-panes-wrapper-v1-divider-col": "cap-timeline-panes-wrapper-v1-divider-col",
11
+ "cap-timeline-panes-wrapper-v1-timelinePane-divider": "cap-timeline-panes-wrapper-v1-timelinePane-divider",
12
+ "cap-timeline-card-v1-division": "cap-timeline-card-v1-division",
13
+ "cap-timeline-card-v1-warning-division": "cap-timeline-card-v1-warning-division",
14
+ "cap-timeline-card-v1-disabled-card": "cap-timeline-card-v1-disabled-card",
15
+ "cap-timeline-card-v1-incomplete-card": "cap-timeline-card-v1-incomplete-card",
16
+ "cap-timeline-card-v1-warning-card": "cap-timeline-card-v1-warning-card",
17
+ "cap-timeline-panes-wrapper-v1-pane-wrapper": "cap-timeline-panes-wrapper-v1-pane-wrapper",
18
+ "cap-timeline-card-v1-disabled-timeline-item": "cap-timeline-card-v1-disabled-timeline-item",
19
+ "cap-timeline-card-v1-enabled-timeline-item": "cap-timeline-card-v1-enabled-timeline-item",
20
+ "cap-timeline-card-v1-enabled-card": "cap-timeline-card-v1-enabled-card",
21
+ "cap-timeline-card-v1-icon-parent": "cap-timeline-card-v1-icon-parent",
22
+ "cap-timeline-card-v1-card-body": "cap-timeline-card-v1-card-body",
23
+ "cap-timeline-card-v1-last-pane": "cap-timeline-card-v1-last-pane",
24
+ "cap-timeline-card-v1-completed-tail": "cap-timeline-card-v1-completed-tail",
25
+ "cap-timeline-card-v1-warning-tail": "cap-timeline-card-v1-warning-tail",
26
+ "cap-timeline-card-v1-complete-head": "cap-timeline-card-v1-complete-head"
27
+ };
28
+ export {
29
+ styles as default
30
+ };
@@ -1,13 +1,11 @@
1
- @import "../styles/_variables.scss";
1
+ @import '../styles/_variables.scss';
2
2
 
3
3
  .cap-timeline-v1-body {
4
- .ant-timeline-item-head-custom {
5
- top: $CAP_SPACE_20;
6
- }
7
- .ant-timeline-item-tail {
8
- top: 1.857rem;
4
+ :global(.ant-timeline-item-rail) {
5
+ top: 2.1rem !important;
9
6
  }
10
7
  }
8
+
11
9
  .cap-timeline-card-v1-pane-selected {
12
10
  background-color: $CAP_PALE_GREY;
13
11
  border-left: solid $CAP_SPACE_04 map-get($CAP_SECONDARY, base);
@@ -35,6 +33,7 @@
35
33
  .cap-timeline-panes-wrapper-v1-right-pane-col {
36
34
  height: 74vh;
37
35
  overflow: auto;
36
+ color: rgba(0, 0, 0, 0.65);
38
37
  }
39
38
 
40
39
  .cap-timeline-panes-wrapper-v1-left-pane-col {
@@ -50,19 +49,27 @@
50
49
  margin-left: $CAP_SPACE_20;
51
50
  margin-right: $CAP_SPACE_24;
52
51
 
53
- .cap-timeline-panes-wrapper-v1-timelinePane-divider,
54
- .ant-divider ant-divider-vertical {
52
+ .cap-timeline-panes-wrapper-v1-timelinePane-divider {
55
53
  margin: 0;
56
54
  }
57
55
  }
58
56
 
59
- .cap-timeline-card-v1-division {
60
- margin-bottom: $CAP_SPACE_12;
57
+ // Need specificity >= (0,0,3,0) to override antd v5's
58
+ // `.ant-steps .ant-steps-item-custom .ant-steps-item-icon { border: 0px }` rule (0,0,3,0)
59
+ :global(.ant-timeline-item).cap-timeline-card-v1-division {
60
+ :global(.ant-timeline-item-icon) {
61
+ border: 0.071rem solid $CAP_G07 !important;
62
+ border-radius: 50% !important;
63
+ padding: 0.214rem 0.214rem !important;
64
+ width: $CAP_SPACE_24 !important;
65
+ height: $CAP_SPACE_24 !important;
66
+ }
67
+ }
61
68
 
62
- .ant-timeline-item-head {
63
- border: 0.143rem solid $CAP_G07;
64
- border-width: 0.071rem;
65
- border-radius: 50%;
69
+ :global(.ant-timeline-item).cap-timeline-card-v1-warning-division {
70
+ :global(.ant-timeline-item-icon) {
71
+ border: 0.071rem solid $CAP_RED !important;
72
+ border-radius: 50% !important;
66
73
  padding: 0.214rem 0.214rem !important;
67
74
  width: $CAP_SPACE_24 !important;
68
75
  height: $CAP_SPACE_24 !important;
@@ -84,90 +91,102 @@
84
91
 
85
92
  .cap-timeline-panes-wrapper-v1-pane-wrapper {
86
93
  display: flex;
94
+ flex-wrap: nowrap;
87
95
  }
88
96
 
89
97
  .cap-timeline-card-v1-disabled-timeline-item {
90
98
  cursor: not-allowed;
91
99
  }
100
+
92
101
  .cap-timeline-card-v1-enabled-timeline-item {
93
102
  cursor: pointer;
94
103
  }
104
+
95
105
  .cap-timeline-card-v1-enabled-card:hover {
96
106
  background-color: $CAP_COLOR_08;
97
107
  }
98
108
 
99
- .cap-timeline-card-v1-warning-card {
100
- border-color: $CAP_RED;
101
- }
102
-
103
109
  .cap-timeline-card-v1-icon-parent {
104
110
  border-radius: 2.857rem;
105
111
  border-color: beige;
106
112
  }
107
113
 
114
+ // Override the default antd v5 card body padding (1.714rem) to match cap-ui-library
115
+ // Also override colorText token (#091e42) back to cap-ui-library's default rgba(0,0,0,0.65)
108
116
  .cap-timeline-card-v1-card-body {
109
- .ant-card-body {
110
- padding: $CAP_SPACE_08 $CAP_SPACE_16;
117
+ :global {
118
+ .ant-card-body,
119
+ .cap-card-wrapper .ant-card .ant-card-body {
120
+ padding: $CAP_SPACE_08 $CAP_SPACE_16 !important;
121
+ color: rgba(0, 0, 0, 0.65);
122
+ }
111
123
  }
112
124
  }
113
125
 
114
126
  .cap-timeline-card-v1-last-pane {
115
- .ant-timeline-item-tail {
127
+ :global(.ant-timeline-item-rail) {
116
128
  display: none;
117
129
  }
118
130
  }
119
131
 
120
132
  .cap-timeline-card-v1-completed-tail {
121
- .ant-timeline-item-tail {
133
+ :global(.ant-timeline-item-rail) {
134
+ border-inline-start: 0.143rem solid $CAP_COLOR_06;
122
135
  border-left: 0.143rem solid $CAP_COLOR_06;
123
136
  }
124
137
  }
125
138
 
126
139
  .cap-timeline-card-v1-warning-tail {
127
- .ant-timeline-item-tail {
140
+ :global(.ant-timeline-item-rail) {
141
+ border-inline-start: 0.143rem solid $CAP_G12;
128
142
  border-left: 0.143rem solid $CAP_G12;
129
143
  }
130
144
  }
131
- .cap-timeline-card-v1-complete-head {
132
- .ant-timeline-item-head {
133
- border: 0.143rem solid $CAP_COLOR_06;
134
- border-width: 0.143rem;
135
- }
136
- }
137
145
 
138
- .cap-timeline-panes-wrapper-v1-timelinePane-divider.cap-divider-v2 {
139
- height: 32.857rem;
140
- }
141
-
142
- .cap-timeline-card-v1-warning-division {
143
- margin-bottom: $CAP_SPACE_12;
144
-
145
- .ant-timeline-item-head {
146
- border: 0.143rem solid $CAP_RED;
147
- border-width: 0.071rem;
148
- border-radius: 50%;
149
- padding: 0.214rem 0.214rem !important;
146
+ :global(.ant-timeline-item).cap-timeline-card-v1-complete-head {
147
+ :global(.ant-timeline-item-icon) {
148
+ border: 0.143rem solid $CAP_COLOR_06 !important;
149
+ border-radius: 50% !important;
150
150
  width: $CAP_SPACE_24 !important;
151
151
  height: $CAP_SPACE_24 !important;
152
+ overflow: hidden;
152
153
  }
153
154
  }
154
155
 
155
- .ant-timeline-item {
156
- padding: 0;
157
-
158
- .ant-timeline-item-content {
159
- top: 0;
160
- margin-left: 2.286rem;
161
- }
162
-
163
- .ant-timeline-item-tail {
164
- left: $CAP_SPACE_12;
165
- }
156
+ .cap-timeline-panes-wrapper-v1-timelinePane-divider:global(.cap-divider-v2) {
157
+ height: 32.857rem;
158
+ }
166
159
 
167
- .ant-timeline-item-head {
168
- left: $CAP_SPACE_12;
169
- display: flex;
170
- justify-content: center;
171
- align-items: center;
160
+ // antd v5 Timeline item positioning
161
+ // antd v5 uses inset-inline-start (logical property) for absolute-positioned elements
162
+ :global {
163
+ .ant-timeline-item {
164
+ padding: 0;
165
+
166
+ .ant-timeline-item-content {
167
+ top: 0;
168
+ }
169
+
170
+ // antd v5 .ant-steps-vertical rule has specificity (0,0,3,0) — need !important
171
+ .ant-timeline-item-rail {
172
+ inset-inline-start: $CAP_SPACE_12 !important;
173
+ }
174
+
175
+ .ant-timeline-item-icon {
176
+ display: flex;
177
+ justify-content: center;
178
+ align-items: center;
179
+ background-color: $CAP_WHITE;
180
+ z-index: 1;
181
+ // ant-wave-target intercepts pointer events, blocking inner tooltip hover.
182
+ // Pass pointer events through to children so tooltips trigger on hover.
183
+ &.ant-wave-target {
184
+ pointer-events: none;
185
+
186
+ > * {
187
+ pointer-events: auto;
188
+ }
189
+ }
190
+ }
172
191
  }
173
192
  }
@@ -0,0 +1,14 @@
1
+ import type { TimelineItemData, TimelinePaneItem } from '../types';
2
+ export declare const createPane: (overrides?: Partial<TimelinePaneItem>) => TimelinePaneItem;
3
+ export declare const createPanes: () => TimelinePaneItem[];
4
+ export declare const panesWrapperBaseProps: {
5
+ isReviewScreen: boolean;
6
+ activeTab: string;
7
+ timelineLeftPaneContents: {
8
+ tab1: string;
9
+ tab2: string;
10
+ tab3: string;
11
+ };
12
+ timelineRightCards: TimelineItemData[];
13
+ };
14
+ //# sourceMappingURL=CapTimeline.mockData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CapTimeline.mockData.d.ts","sourceRoot":"","sources":["../../../components/CapTimeline/tests/CapTimeline.mockData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEnE,eAAO,MAAM,UAAU,GAAI,YAAW,OAAO,CAAC,gBAAgB,CAAM,KAAG,gBAerE,CAAC;AAEH,eAAO,MAAM,WAAW,QAAO,gBAAgB,EAgB9C,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;wBAe3B,gBAAgB,EAAE;CACxB,CAAC"}
@@ -0,0 +1,60 @@
1
+ import type React from 'react';
2
+ export interface TimelinePaneItem {
3
+ milestoneHeader?: React.ReactNode;
4
+ milestoneDescription?: React.ReactNode;
5
+ disabled?: boolean;
6
+ configuringMessage?: string;
7
+ notConfiguredMessage?: string;
8
+ key: string;
9
+ paneKey?: string | number;
10
+ alwaysShowDescription?: boolean;
11
+ complete?: boolean;
12
+ content?: React.ReactNode;
13
+ configError?: boolean;
14
+ edited?: boolean;
15
+ handleClick?: () => void;
16
+ }
17
+ export interface CapTimelineProps {
18
+ className?: string;
19
+ timelinePanes: TimelinePaneItem[];
20
+ activeTab?: string;
21
+ isReviewScreen?: boolean;
22
+ width?: number;
23
+ }
24
+ export interface CapTimelineCardProps {
25
+ className?: string;
26
+ isSelected?: boolean;
27
+ handleClick?: () => void;
28
+ milestoneHeader?: React.ReactNode;
29
+ milestoneDescription?: React.ReactNode;
30
+ disabled?: boolean;
31
+ configuringMessage?: string;
32
+ notConfiguredMessage?: string;
33
+ alwaysShowDescription?: boolean;
34
+ complete?: boolean;
35
+ configError?: boolean;
36
+ defaultConfiguringMessage?: string;
37
+ paneKey?: string | number;
38
+ isLastPane?: boolean;
39
+ width?: number;
40
+ defaultNotConfiguredMessage?: string;
41
+ toConfigure?: string;
42
+ completePrevSteps?: string;
43
+ edited?: boolean;
44
+ }
45
+ /** Represents a single antd v5 Timeline item data object */
46
+ export interface TimelineItemData {
47
+ key?: string;
48
+ icon?: React.ReactNode;
49
+ content?: React.ReactNode;
50
+ className?: string;
51
+ }
52
+ export interface CapTimelinePanesWrapperProps {
53
+ className?: string;
54
+ isReviewScreen?: boolean;
55
+ activeTab?: string;
56
+ timelineLeftPaneContents: Record<string, React.ReactNode>;
57
+ timelineRightCards: TimelineItemData[];
58
+ timelineClassName?: string;
59
+ }
60
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapTimeline/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,EAAE,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1 @@
1
+
package/index.d.ts CHANGED
@@ -61,6 +61,10 @@ export { default as CapCalendarDatePicker } from './CapCalendarDatePicker';
61
61
  export type { CapCalendarDatePickerProps } from './CapCalendarDatePicker/types';
62
62
  export { default as CapDivider } from './CapDivider';
63
63
  export type { CapDividerProps } from './CapDivider/types';
64
+ export { default as CapDndGraphSidebar } from './CapDndGraphSidebar';
65
+ export type { CapDndGraphSidebarProps, Node, ChildNode, SideBarIconProps, SidebarNodesRenderedProps, } from './CapDndGraphSidebar/types';
66
+ export { default as CapDragAndDrop } from './CapDragAndDrop';
67
+ export type { CapDragAndDropProps } from './CapDragAndDrop/types';
64
68
  export { default as CapDragReorder } from './CapDragReorder';
65
69
  export type { CapDragReorderProps, CardData, DragItem as CapDragReorderDragItem, } from './CapDragReorder/types';
66
70
  export { default as CapDrawer } from './CapDrawer';
@@ -119,6 +123,8 @@ export { default as CapMenu } from './CapMenu';
119
123
  export type { CapMenuProps } from './CapMenu';
120
124
  export { default as CapModal } from './CapModal';
121
125
  export type { CapModalProps, CapModalStaticMethods } from './CapModal/types';
126
+ export { default as CapMediaPreview } from './CapMediaPreview';
127
+ export type { CapMediaPreviewProps, MediaItem, MediaRendererProps, ImageRendererProps, VideoPlayerProps, } from './CapMediaPreview/types';
122
128
  export { default as CapMobileDatePicker } from './CapMobileDatePicker';
123
129
  export type { CapMobileDatePickerProps } from './CapMobileDatePicker/types';
124
130
  export { default as CapMobileDateRangePicker } from './CapMobileDateRangePicker';
@@ -196,6 +202,8 @@ export type { CapTabProps, TabPaneData, DeprecatedTabPosition } from './CapTab/t
196
202
  export { default as CapTable } from './CapTable';
197
203
  export type { CapTableProps, OffsetLimit } from './CapTable';
198
204
  export { default as CapTabV3 } from './CapTabV3';
205
+ export { default as CapTimeline } from './CapTimeline';
206
+ export type { CapTimelineCardProps, CapTimelinePanesWrapperProps, CapTimelineProps, TimelinePaneItem, } from './CapTimeline/types';
199
207
  export { default as CapTimePicker } from './CapTimePicker';
200
208
  export type { CapTimePickerProps } from './CapTimePicker';
201
209
  export type { CapTabV3Props } from './CapTabV3/types';