@capillarytech/blaze-ui 5.21.0 → 5.22.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 (177) hide show
  1. package/CapLanguageProvider/actions.js +125 -0
  2. package/CapLanguageProvider/actions.js.map +1 -0
  3. package/CapLanguageProvider/constants.js +37 -0
  4. package/CapLanguageProvider/constants.js.map +1 -0
  5. package/package.json +1 -1
  6. package/CapActionBar/README.md +0 -11
  7. package/CapAdvancedIcon/README.md +0 -185
  8. package/CapAdvancedIcon/use-cases.md +0 -44
  9. package/CapAlert/README.md +0 -144
  10. package/CapAppNotEnabled/README.md +0 -84
  11. package/CapAskAira/README.md +0 -328
  12. package/CapBanner/README.md +0 -4
  13. package/CapBlock/README.md +0 -175
  14. package/CapBorderedBox/Status.md +0 -40
  15. package/CapCSVFileUploader/README.md +0 -124
  16. package/CapCSVFileUploader/Status.md +0 -47
  17. package/CapCard/README.md +0 -85
  18. package/CapCard/Status.md +0 -41
  19. package/CapCardBox/README.md +0 -169
  20. package/CapCardBox/Status.md +0 -52
  21. package/CapCarousel/README.md +0 -190
  22. package/CapCarousel/Status.md +0 -73
  23. package/CapCheckbox/README.md +0 -254
  24. package/CapCheckbox/Status.md +0 -41
  25. package/CapColorPicker/README.md +0 -112
  26. package/CapColorPicker/Status.md +0 -52
  27. package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
  28. package/CapColoredTag/README.md +0 -167
  29. package/CapColoredTag/Status.md +0 -49
  30. package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
  31. package/CapConditionPreview/README.md +0 -40
  32. package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
  33. package/CapCustomCard/README.md +0 -182
  34. package/CapCustomCard/Status.md +0 -40
  35. package/CapCustomCarousel/Status.md +0 -69
  36. package/CapCustomCheckboxList/README.md +0 -178
  37. package/CapCustomCheckboxList/Status.md +0 -52
  38. package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
  39. package/CapCustomList/README.md +0 -117
  40. package/CapCustomList/Status.md +0 -77
  41. package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
  42. package/CapCustomSelect/README.md +0 -38
  43. package/CapDatePicker/README.md +0 -139
  44. package/CapDateRangePicker/README.md +0 -159
  45. package/CapDateTimePicker/README.md +0 -136
  46. package/CapDateTimeRangePicker/README.md +0 -243
  47. package/CapDivider/README.md +0 -122
  48. package/CapDrawer/README.md +0 -207
  49. package/CapDrawer/Status.md +0 -52
  50. package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
  51. package/CapDropdown/README.md +0 -515
  52. package/CapDropdown/Status.md +0 -45
  53. package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
  54. package/CapError/README.md +0 -88
  55. package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
  56. package/CapErrorBoundary/README.md +0 -150
  57. package/CapErrorStateIllustration/README.md +0 -222
  58. package/CapErrorStateIllustration/USE_CASES.md +0 -33
  59. package/CapExpressionEditor/README.md +0 -32
  60. package/CapForm/README.md +0 -132
  61. package/CapForm/Status.md +0 -40
  62. package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
  63. package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
  64. package/CapFormItem/README.md +0 -320
  65. package/CapFormItem/Status.md +0 -73
  66. package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
  67. package/CapGraph/README.md +0 -69
  68. package/CapGraph/USE_CASES.md +0 -66
  69. package/CapHamburgerMenu/README.md +0 -234
  70. package/CapHamburgerMenu/USE_CASES.md +0 -48
  71. package/CapHeader/Status.md +0 -41
  72. package/CapHeading/README.md +0 -220
  73. package/CapHeading/Status.md +0 -41
  74. package/CapIcon/README.md +0 -207
  75. package/CapIllustration/Status.md +0 -41
  76. package/CapImage/README.md +0 -50
  77. package/CapImportMFEComponent/README.md +0 -121
  78. package/CapInfoNote/Status.md +0 -40
  79. package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
  80. package/CapInput/README.md +0 -196
  81. package/CapInput/Status.md +0 -123
  82. package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
  83. package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
  84. package/CapLanguageProvider/README.md +0 -206
  85. package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
  86. package/CapLevelGraphRenderer/README.md +0 -123
  87. package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
  88. package/CapLink/README.md +0 -203
  89. package/CapLink/Status.md +0 -32
  90. package/CapLink/tests/CapLink.missingUseCases.md +0 -95
  91. package/CapList/README.md +0 -129
  92. package/CapList/Status.md +0 -69
  93. package/CapListLayout/README.md +0 -7
  94. package/CapLogin/README.md +0 -7
  95. package/CapMenu/README.md +0 -86
  96. package/CapModal/README.md +0 -357
  97. package/CapModal/Status.md +0 -52
  98. package/CapModal/tests/USE_CASES_GAPS.md +0 -207
  99. package/CapMultiSelect/README.md +0 -170
  100. package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
  101. package/CapMultiSelectDatePicker/README.md +0 -11
  102. package/CapNavigation/README.md +0 -72
  103. package/CapNotification/README.md +0 -228
  104. package/CapNotificationDropdown/README.md +0 -5
  105. package/CapPopover/README.md +0 -234
  106. package/CapProgress/Status.md +0 -40
  107. package/CapRadio/Status.md +0 -54
  108. package/CapRadioButton/README.md +0 -152
  109. package/CapRadioButton/Status.md +0 -70
  110. package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
  111. package/CapRadioCard/README.md +0 -161
  112. package/CapRadioCard/Status.md +0 -78
  113. package/CapRadioGroup/README.md +0 -141
  114. package/CapRadioGroup/Status.md +0 -59
  115. package/CapReorderComponent/README.md +0 -179
  116. package/CapReorderComponent/Status.md +0 -41
  117. package/CapRoadMap/README.md +0 -126
  118. package/CapRoadMap/Status.md +0 -53
  119. package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
  120. package/CapRow/README.md +0 -424
  121. package/CapSKUUploader/README.md +0 -189
  122. package/CapSKUUploader/Status.md +0 -66
  123. package/CapSecondaryTopBar/README.md +0 -7
  124. package/CapSelect/README.md +0 -243
  125. package/CapSelectFilter/README.md +0 -121
  126. package/CapShape/README.md +0 -96
  127. package/CapShape/Status.md +0 -36
  128. package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
  129. package/CapSideBar/README.md +0 -298
  130. package/CapSideBar/Status.md +0 -5
  131. package/CapSlideBox/README.md +0 -68
  132. package/CapSlider/README.md +0 -423
  133. package/CapSlider/Status.md +0 -48
  134. package/CapSlider/tests/TEST_COVERAGE.md +0 -118
  135. package/CapSnackBar/README.md +0 -222
  136. package/CapSnackBar/Status.md +0 -41
  137. package/CapSomethingWentWrong/README.md +0 -97
  138. package/CapSplit/README.md +0 -19
  139. package/CapStatisticCard/README.md +0 -138
  140. package/CapStatus/README.md +0 -148
  141. package/CapStatus/Status.md +0 -40
  142. package/CapSteps/Status.md +0 -40
  143. package/CapStepsAccordian/README.md +0 -305
  144. package/CapStepsAccordian/Status.md +0 -48
  145. package/CapSupportVideosWrapper/README.md +0 -14
  146. package/CapSwitch/README.md +0 -351
  147. package/CapTab/README.md +0 -406
  148. package/CapTab/Status.md +0 -104
  149. package/CapTab/tests/USE_CASE_GAPS.md +0 -143
  150. package/CapTabV3/ANALYSIS.md +0 -60
  151. package/CapTabV3/README.md +0 -156
  152. package/CapTabV3/Status.md +0 -52
  153. package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
  154. package/CapTable/README.md +0 -160
  155. package/CapTable/Status.md +0 -41
  156. package/CapTag/README.md +0 -16
  157. package/CapTagDropdown/README.md +0 -171
  158. package/CapTagDropdown/Status.md +0 -55
  159. package/CapTimePicker/README.md +0 -170
  160. package/CapTooltip/README.md +0 -336
  161. package/CapTooltipWithInfo/Status.md +0 -75
  162. package/CapTopBar/README.md +0 -146
  163. package/CapTree/README.md +0 -124
  164. package/CapTree/Status.md +0 -48
  165. package/CapTree/tests/STATUS.md +0 -154
  166. package/CapTreeSelect/README.md +0 -217
  167. package/CapTreeSelect/Status.md +0 -52
  168. package/CapTruncateList/README.md +0 -13
  169. package/CapUnifiedSelect/README.md +0 -40
  170. package/CapUploader/README.md +0 -313
  171. package/CapUploader/Status.md +0 -76
  172. package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
  173. package/CapUserProfile/README.md +0 -105
  174. package/CapUserProfile/Status.md +0 -95
  175. package/CapVirtualList/README.md +0 -162
  176. package/CapVirtualList/Status.md +0 -71
  177. package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
@@ -1,336 +0,0 @@
1
- # CapTooltip
2
-
3
- Enhanced tooltip component built on Ant Design v6 with backward compatibility for Ant Design v3 APIs.
4
-
5
- ## Summary of Changes from cap-ui-library
6
-
7
- The `CapTooltip` component has been migrated from `cap-ui-library` to `blaze-ui` with the following updates:
8
-
9
- - **TypeScript**: Full TypeScript implementation with proper type definitions
10
- - **Ant Design v6**: Updated to use Ant Design v6 APIs while maintaining backward compatibility
11
- - **SCSS Modules**: Converted from styled-components to SCSS modules
12
- - **Enhanced API**: Added support for controlled/uncontrolled modes and additional Ant Design v6 features
13
- - **Backward Compatible**: All deprecated props from Ant Design v3 still work with console warnings
14
-
15
- ## Props
16
-
17
- ### Supported Props
18
-
19
- The component accepts all Ant Design v6 `Tooltip` props, plus the following additions:
20
-
21
- | Prop | Type | Default | Description |
22
- |------|------|---------|-------------|
23
- | `title` | `React.ReactNode` | - | Tooltip content |
24
- | `children` | `React.ReactNode` | - | Trigger element |
25
- | `placement` | `TooltipPlacement` | `'top'` | Tooltip placement relative to trigger |
26
- | `open` | `boolean` | - | Controlled open state |
27
- | `defaultOpen` | `boolean` | `false` | Default open state (uncontrolled) |
28
- | `onOpenChange` | `(open: boolean) => void` | - | Callback when open state changes |
29
- | `trigger` | `'hover' \| 'focus' \| 'click' \| 'contextMenu' \| Array` | `'hover'` | Tooltip trigger action(s) |
30
- | `destroyOnHidden` | `boolean` | `false` | Whether to destroy tooltip when hidden |
31
- | `mouseEnterDelay` | `number` | `0.1` | Delay in seconds before showing tooltip on hover |
32
- | `mouseLeaveDelay` | `number` | `0.1` | Delay in seconds before hiding tooltip on hover out |
33
- | `autoAdjustOverflow` | `boolean` | `true` | Whether to adjust tooltip position automatically |
34
- | `classNames` | `{ root?: string }` | - | Custom class names for tooltip parts |
35
- | `styles` | `{ root?: React.CSSProperties }` | - | Custom styles for tooltip parts |
36
- | `align` | `AlignConfig` | - | Tooltip alignment configuration |
37
- | `getPopupContainer` | `(triggerNode: HTMLElement) => HTMLElement` | - | Container for tooltip rendering |
38
- | `className` | `string` | `''` | Additional CSS class name for the tooltip wrapper |
39
-
40
- ### Deprecated Props (Still Supported)
41
-
42
- These props are deprecated but still work for backward compatibility. They will show console warnings in development mode:
43
-
44
- | Deprecated Prop | Replacement | Notes |
45
- |----------------|-------------|-------|
46
- | `visible` | `open` | Use `open` for controlled state |
47
- | `onVisibleChange` | `onOpenChange` | Use `onOpenChange` for controlled state callbacks |
48
- | `destroyTooltipOnHide` | `destroyOnHidden` | Use `destroyOnHidden` for destroy behavior |
49
- | `overlayClassName` | `classNames.root` | Use `classNames.root` for overlay styling |
50
- | `overlayStyle` | `styles.root` | Use `styles.root` for overlay inline styles |
51
-
52
- **Note**: Deprecated props will be removed in the next major version. Please migrate to the new prop names.
53
-
54
- ## API Changes
55
-
56
- ### Controlled vs Uncontrolled Mode
57
-
58
- The component now supports both controlled and uncontrolled modes:
59
-
60
- **Controlled Mode:**
61
- ```tsx
62
- const [open, setOpen] = useState(false);
63
-
64
- <CapTooltip
65
- title="Controlled tooltip"
66
- open={open}
67
- onOpenChange={setOpen}
68
- >
69
- <Button>Hover me</Button>
70
- </CapTooltip>
71
- ```
72
-
73
- **Uncontrolled Mode:**
74
- ```tsx
75
- <CapTooltip
76
- title="Uncontrolled tooltip"
77
- defaultOpen={false}
78
- >
79
- <Button>Hover me</Button>
80
- </CapTooltip>
81
- ```
82
-
83
- ### Styling API Changes
84
-
85
- **Old API (deprecated):**
86
- ```tsx
87
- <CapTooltip
88
- overlayClassName="custom-class"
89
- overlayStyle={{ backgroundColor: 'red' }}
90
- >
91
- <Button>Button</Button>
92
- </CapTooltip>
93
- ```
94
-
95
- **New API (recommended):**
96
- ```tsx
97
- <CapTooltip
98
- classNames={{ root: 'custom-class' }}
99
- styles={{ root: { backgroundColor: 'red' } }}
100
- >
101
- <Button>Button</Button>
102
- </CapTooltip>
103
- ```
104
-
105
- ## Behavioral Changes
106
-
107
- ### No Breaking Changes
108
-
109
- The component maintains **100% backward compatibility** with `cap-ui-library` v8.x. All existing code will continue to work without modifications.
110
-
111
- ### Enhanced Features
112
-
113
- - **Controlled State**: Full support for controlled tooltip state management
114
- - **Destroy on Hide**: Option to destroy tooltip DOM when hidden for performance optimization
115
- - **Custom Styling**: Enhanced styling API with `classNames` and `styles` props
116
- - **Delay Configuration**: Configurable mouse enter/leave delays
117
- - **Auto Adjust Overflow**: Automatic position adjustment to stay within viewport
118
-
119
- ## Migration Steps for Consumers
120
-
121
- ### Step 1: Update Imports
122
-
123
- **Before:**
124
- ```tsx
125
- import { CapTooltip } from '@capillarytech/cap-ui-library';
126
- ```
127
-
128
- **After:**
129
- ```tsx
130
- import { CapTooltip } from '@capillarytech/blaze-ui';
131
- ```
132
-
133
- ### Step 2: Update Deprecated Props (Optional)
134
-
135
- While deprecated props still work, it's recommended to update them:
136
-
137
- **Before:**
138
- ```tsx
139
- <CapTooltip
140
- visible={isOpen}
141
- onVisibleChange={setIsOpen}
142
- overlayClassName="custom-tooltip"
143
- overlayStyle={{ color: 'white' }}
144
- destroyTooltipOnHide
145
- >
146
- <Button>Button</Button>
147
- </CapTooltip>
148
- ```
149
-
150
- **After:**
151
- ```tsx
152
- <CapTooltip
153
- open={isOpen}
154
- onOpenChange={setIsOpen}
155
- classNames={{ root: 'custom-tooltip' }}
156
- styles={{ root: { color: 'white' } }}
157
- destroyOnHidden
158
- >
159
- <Button>Button</Button>
160
- </CapTooltip>
161
- ```
162
-
163
- ### Step 3: Use Controlled Mode (Optional)
164
-
165
- If you need programmatic control over tooltip visibility:
166
-
167
- ```tsx
168
- const [tooltipOpen, setTooltipOpen] = useState(false);
169
-
170
- <CapTooltip
171
- title="Controlled tooltip"
172
- open={tooltipOpen}
173
- onOpenChange={setTooltipOpen}
174
- >
175
- <Button onClick={() => setTooltipOpen(true)}>Show Tooltip</Button>
176
- </CapTooltip>
177
- ```
178
-
179
- ## Code Examples
180
-
181
- ### Basic Usage
182
-
183
- ```tsx
184
- import { CapTooltip } from '@capillarytech/blaze-ui';
185
- import { Button } from 'antd-v5';
186
-
187
- function MyComponent() {
188
- return (
189
- <CapTooltip title="This is a tooltip">
190
- <Button>Hover me</Button>
191
- </CapTooltip>
192
- );
193
- }
194
- ```
195
-
196
- ### With Different Placements
197
-
198
- ```tsx
199
- <CapTooltip title="Top tooltip" placement="top">
200
- <Button>Top</Button>
201
- </CapTooltip>
202
-
203
- <CapTooltip title="Bottom tooltip" placement="bottom">
204
- <Button>Bottom</Button>
205
- </CapTooltip>
206
-
207
- <CapTooltip title="Left tooltip" placement="left">
208
- <Button>Left</Button>
209
- </CapTooltip>
210
-
211
- <CapTooltip title="Right tooltip" placement="right">
212
- <Button>Right</Button>
213
- </CapTooltip>
214
- ```
215
-
216
- ### With Different Triggers
217
-
218
- ```tsx
219
- <CapTooltip title="Hover tooltip" trigger="hover">
220
- <Button>Hover</Button>
221
- </CapTooltip>
222
-
223
- <CapTooltip title="Click tooltip" trigger="click">
224
- <Button>Click</Button>
225
- </CapTooltip>
226
-
227
- <CapTooltip title="Focus tooltip" trigger="focus">
228
- <Button>Focus</Button>
229
- </CapTooltip>
230
- ```
231
-
232
- ### With Custom Content
233
-
234
- ```tsx
235
- <CapTooltip
236
- title={
237
- <div>
238
- <strong>Custom HTML</strong>
239
- <br />
240
- <span>This tooltip contains formatted content</span>
241
- </div>
242
- }
243
- >
244
- <Button>Custom Content</Button>
245
- </CapTooltip>
246
- ```
247
-
248
- ### With Disabled Button
249
-
250
- **Important**: When using tooltips with disabled buttons, wrap the button with an element having the class `button-disabled-tooltip-wrapper`:
251
-
252
- ```tsx
253
- <CapTooltip title="Disabled button tooltip">
254
- <span className="button-disabled-tooltip-wrapper">
255
- <Button disabled>Disabled Button</Button>
256
- </span>
257
- </CapTooltip>
258
- ```
259
-
260
- ### Controlled Tooltip
261
-
262
- ```tsx
263
- import { useState } from 'react';
264
-
265
- function ControlledExample() {
266
- const [open, setOpen] = useState(false);
267
-
268
- return (
269
- <div>
270
- <CapTooltip
271
- title="This tooltip is controlled"
272
- open={open}
273
- onOpenChange={setOpen}
274
- >
275
- <Button>Controlled Tooltip</Button>
276
- </CapTooltip>
277
- <Button onClick={() => setOpen(!open)}>
278
- Toggle Tooltip
279
- </Button>
280
- </div>
281
- );
282
- }
283
- ```
284
-
285
- ### Custom Styling
286
-
287
- ```tsx
288
- <CapTooltip
289
- title="Custom styled tooltip"
290
- classNames={{ root: 'my-custom-tooltip-class' }}
291
- styles={{ root: { backgroundColor: '#47af46', color: 'white' } }}
292
- >
293
- <Button>Styled Tooltip</Button>
294
- </CapTooltip>
295
- ```
296
-
297
- ## Import Examples
298
-
299
- ### Default Import
300
-
301
- ```tsx
302
- import CapTooltip from '@capillarytech/blaze-ui/components/CapTooltip';
303
- ```
304
-
305
- ### Named Import
306
-
307
- ```tsx
308
- import { CapTooltip } from '@capillarytech/blaze-ui';
309
- ```
310
-
311
- ### With TypeScript Types
312
-
313
- ```tsx
314
- import { CapTooltip } from '@capillarytech/blaze-ui';
315
- import type { CapTooltipProps } from '@capillarytech/blaze-ui';
316
-
317
- const props: CapTooltipProps = {
318
- title: 'Tooltip text',
319
- placement: 'top',
320
- };
321
- ```
322
-
323
- ## Notes
324
-
325
- - **No Breaking Changes**: The component is fully backward compatible with `cap-ui-library` v8.x
326
- - **Deprecated Props**: Deprecated props will show console warnings in development mode but continue to work
327
- - **Disabled Buttons**: Always wrap disabled buttons with `button-disabled-tooltip-wrapper` class for tooltips to work correctly
328
- - **Performance**: Use `destroyOnHidden={true}` when rendering many tooltips to improve performance
329
- - **Styling**: The component uses SCSS modules. Custom styles can be applied via `classNames` and `styles` props
330
-
331
- ## Related Components
332
-
333
- - `CapTooltipWithInfo` - Tooltip component with info icon
334
- - `CapButton` - Button component that works well with tooltips
335
- - `CapIcon` - Icon component that can be wrapped with tooltips
336
-
@@ -1,75 +0,0 @@
1
- # Migration Status: CapTooltipWithInfo
2
-
3
- **Last Updated**: 2026-02-06 20:04:51
4
-
5
- ## Migration Steps
6
-
7
- - [x] **Step 0**: Setup branch and remote tracking
8
- - [x] **Step 1**: Migration Prompt 1 (Main migration)
9
- - [x] **Step 2**: Migration Prompt 2 (Storybook support)
10
- - [x] **Step 3**: Migration Prompt 3 (Unit tests)
11
- - [x] **Step 4**: Migration Prompt 4 (Visual test cases)
12
- - [x] **Step 5**: Linting (ESLint)
13
- - [x] **Step 6**: Pre-build Validation
14
- - [x] **Step 7**: Build blaze-ui
15
- - [x] **Step 8**: Visual Testing
16
- - [ ] **Step 9**: CSS Analysis (if mismatches found)
17
- - [ ] **Step 9.5**: CSS Analysis Completed
18
- - [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
19
- - [x] **Step 11**: Create Pull Request
20
-
21
- ## Visual Testing Results
22
-
23
- **Last Test**: 2026-02-06 20:04:51
24
- **Maximum Mismatch**: 0%
25
-
26
- ### Mismatched Variants:
27
- -
28
-
29
-
30
- ## CSS Fixes Applied
31
-
32
- _No CSS fixes applied yet._
33
-
34
- ## Notes
35
-
36
- ### Unit Test Implementation (2026-01-26)
37
-
38
- **Phase 0**: Google Sheets access unavailable - MCP server "google_sheets" not found. Proceeding with comprehensive tests based on component interface.
39
-
40
- **Phase 1**: Use Cases Analysis
41
-
42
- **Component Currently Supports:**
43
- - ✅ Default rendering with info-circle icon
44
- - ✅ Custom icon types (info-circle, question-circle, etc.)
45
- - ✅ Icon size variations (xs, s, m, l)
46
- - ✅ Tooltip placement (12 positions: top, bottom, left, right, and their variants)
47
- - ✅ Multiple trigger types (hover, focus, click, contextMenu, or array combinations)
48
- - ✅ Custom className support
49
- - ✅ HTML attributes spreading (id, aria-label, aria-describedby, role, etc.)
50
- - ✅ React node titles (HTML content)
51
- - ✅ tooltipProps spreading to CapTooltip
52
- - ✅ iconProps spreading to CapIcon
53
- - ✅ Event handlers (onClick, onMouseEnter, onMouseLeave, onFocus, onBlur)
54
-
55
- **Use Cases NOT Currently Fulfilled** (based on component analysis):
56
- - ⚠️ **Unable to verify against Google Sheets requirements** - MCP server unavailable
57
- - ⚠️ Component relies on CapTooltip/CapIcon - any limitations there would affect this component
58
- - ⚠️ No built-in validation or error states for title prop
59
- - ⚠️ No built-in loading states
60
- - ⚠️ No built-in disabled state (would need to be handled via iconProps or wrapper attributes)
61
-
62
- **Phase 2**: Comprehensive test suite implemented with 90%+ coverage:
63
- - Default rendering and initialization tests
64
- - Prop variations (iconSize, iconType, placement, trigger, className)
65
- - User interactions (hover, click, focus, contextMenu, multiple triggers)
66
- - Event handlers and callbacks
67
- - Data flow (tooltipProps, iconProps, HTML attributes spreading)
68
- - Edge cases (empty title, long title, React node title, all custom props)
69
- - Accessibility (ARIA attributes, keyboard navigation, role support)
70
- - Conditional rendering logic
71
- - Backward compatibility
72
-
73
- **Test Files Created:**
74
- - `tests/CapTooltipWithInfo.test.tsx` - Comprehensive test suite
75
- - `tests/CapTooltipWithInfo.mockData.ts` - Mock data and test props
@@ -1,146 +0,0 @@
1
- # CapTopBar
2
-
3
- CapTopBar component migrated from Ant Design v3 to v6.
4
-
5
- ## Migration Summary
6
-
7
- This component has been migrated to use Ant Design v6 APIs and design tokens.
8
-
9
- ## Breaking Changes
10
-
11
- **No breaking changes** - The component maintains **100% backward compatibility** with existing code. Deprecated Ant Design APIs continue to work exactly as before. However, deprecated APIs will show console warnings in development mode and should be migrated to the new API for future compatibility.
12
-
13
- ## Deprecated Props
14
-
15
- The following Ant Design component APIs are deprecated but still supported for backward compatibility:
16
-
17
- ### `visible` / `onVisibleChange` (Drawer, Dropdown, Popover Components)
18
-
19
- - **Status:** ⚠️ Deprecated
20
- - **Ant Design Components:** Drawer, Dropdown, Popover
21
- - **Deprecated Props:** `visible`, `onVisibleChange`
22
- - **Replacement:** Use `open` and `onOpenChange` props instead
23
- - **Migration:** Replace `visible` with `open` and `onVisibleChange` with `onOpenChange`
24
- - **Removal:** Will be removed in next major version
25
-
26
- **Before (Deprecated):**
27
- ```tsx
28
- <CapDrawer visible={true} onVisibleChange={handleChange} />
29
- <CapDropdown visible={true} onVisibleChange={handleChange} />
30
- <CapPopover visible={true} onVisibleChange={handleChange} />
31
- ```
32
-
33
- **After (Recommended):**
34
- ```tsx
35
- <CapDrawer open={true} onOpenChange={handleChange} />
36
- <CapDropdown open={true} onOpenChange={handleChange} />
37
- <CapPopover open={true} onOpenChange={handleChange} />
38
- ```
39
-
40
- **Note:** A deprecation warning will be shown in development mode when using `visible` instead of `open`.
41
-
42
- ### `overlay` / `overlayClassName` (Dropdown Component)
43
-
44
- - **Status:** ⚠️ Deprecated
45
- - **Ant Design Component:** Dropdown
46
- - **Deprecated Props:** `overlay`, `overlayClassName`
47
- - **Replacement:** Use `menu` and `popupClassName` props instead
48
- - **Migration:** Replace `overlay` with `menu` (object format) and `overlayClassName` with `popupClassName`
49
- - **Removal:** Will be removed in next major version
50
-
51
- **Before (Deprecated):**
52
- ```tsx
53
- <CapDropdown overlay={<CapMenu>...</CapMenu>} overlayClassName="custom-class" />
54
- ```
55
-
56
- **After (Recommended):**
57
- ```tsx
58
- <CapDropdown
59
- menu={{ items: [...] }}
60
- popupClassName="custom-class"
61
- />
62
- ```
63
-
64
- **Note:** A deprecation warning will be shown in development mode when using `overlay` instead of `menu`.
65
-
66
- ## Style Changes
67
-
68
- **Approach**: The component uses CSS Modules with design tokens. Custom styling is applied through:
69
- - CSS Modules classes for component-specific styles
70
- - Design tokens via theme config (`getCapThemeConfig.ts`) for Antd component styling
71
- - `:global` overrides with `// OVERRIDE:` comments for non-tokenizable cases
72
-
73
- ### Tokenized Styles
74
-
75
- The following Antd component styles are now controlled via design tokens in `getCapThemeConfig.ts`:
76
-
77
- - **Layout.Header**: `headerBg`, `headerPadding`, `headerHeight`
78
- - **Drawer**: `headerBg`, `headerPadding`, `bodyPadding`
79
- - **Dropdown**: `controlItemHeight`
80
- - **Menu**: `itemColor`, `itemSelectedColor`, `itemHoverColor`, `itemActiveBorderBottomWidth`
81
- - **Divider**: `verticalMarginInline`
82
-
83
- ### Non-Tokenizable Overrides
84
-
85
- The following styles remain as `:global` overrides with `// OVERRIDE:` comments:
86
-
87
- 1. **Menu horizontal margin-right** (line 119-123): Media query specific margin - layout specific, no token available
88
- 2. **Divider horizontal width and margin** (line 171-174): Custom width and margin in user profile context - component specific
89
- 3. **Popover padding-top, width, inner-content padding, arrow display** (line 321-332): Layout-specific popover customization - no tokens available
90
-
91
- ## Code Improvements
92
-
93
- 1. **Removed PropTypes**: Replaced with TypeScript interfaces in `types.ts`
94
- 2. **Converted to functional component**: Changed from class component to functional component with hooks
95
- 3. **Using CSS Modules**: All styles use CSS Modules with `styles[classname]` pattern
96
- 4. **Improved backward compatibility**: Deprecated props are handled internally by child components (CapDrawer, CapDropdown, CapPopover)
97
- 5. **Type safety**: Full TypeScript support with proper types exported
98
-
99
- ## Component Architecture Changes
100
-
101
- - **Class Component → Functional Component**: Converted from React class component to functional component
102
- - **State Management**: Replaced `this.state` with `useState` hooks
103
- - **Methods → Callbacks**: Converted class methods to `useCallback` hooks for performance optimization
104
- - **Props Types**: Migrated from PropTypes to TypeScript interfaces
105
-
106
- ## What Stayed the Same
107
-
108
- - All component props and API surface area
109
- - Component behavior and functionality
110
- - Styling appearance (maintained through tokens and CSS Modules)
111
- - Backward compatibility for all existing usage
112
-
113
- ## What Changed
114
-
115
- - **Removed**: PropTypes dependency
116
- - **Removed**: Class component pattern
117
- - **Added**: TypeScript type definitions
118
- - **Added**: CSS Modules support
119
- - **Added**: Design token integration
120
- - **Updated**: Antd imports to use `antd-v5` (v6)
121
-
122
- ## Usage Example
123
-
124
- ```tsx
125
- import CapTopBar from '@capillarytech/blaze-ui';
126
-
127
- <CapTopBar
128
- menuProps={{
129
- items: [
130
- { key: '1', label: 'Home' },
131
- { key: '2', label: 'About' },
132
- ],
133
- onMenuItemClick: (item) => console.log(item),
134
- }}
135
- topbarIcons={[
136
- { iconType: 'bell', onClickHandler: () => console.log('bell clicked') },
137
- ]}
138
- dropdownMenuProps={[
139
- { key: 'profile', label: 'Profile', onClickHandler: () => {} },
140
- { key: 'logout', label: 'Logout', onClickHandler: () => {} },
141
- ]}
142
- breadcrumbs="Home / Dashboard"
143
- isLatestLeftNavigationEnabled={true}
144
- leftNavbarExpanded={false}
145
- />
146
- ```
package/CapTree/README.md DELETED
@@ -1,124 +0,0 @@
1
- # CapTree
2
-
3
- CapTree component migrated from Ant Design v3 to v6.
4
-
5
- ## Migration Summary
6
-
7
- This component has been migrated to use Ant Design v6 APIs and design tokens.
8
-
9
- ## Breaking Changes
10
-
11
- **No breaking changes** - The component maintains **100% backward compatibility** with existing code. Deprecated APIs (`CapTree.CapTreeNode` and `children` prop with TreeNode pattern) continue to work exactly as before. However, deprecated APIs will show console warnings in development mode and should be migrated to the new API for future compatibility.
12
-
13
- ## Deprecated Props
14
-
15
- The following Ant Design component APIs are deprecated but still supported for backward compatibility:
16
-
17
- ### `CapTree.CapTreeNode` Component (Ant Design Tree Component)
18
-
19
- - **Status:** ⚠️ Deprecated
20
- - **Ant Design Component:** Tree
21
- - **Deprecated Prop:** `CapTree.CapTreeNode` component usage
22
- - **Replacement:** Use `treeData` prop instead
23
- - **Migration:** Convert TreeNode children structure to `treeData` array format
24
- - **Removal:** Will be removed in v10.0.0
25
-
26
- **Before (Deprecated):**
27
-
28
- ```tsx
29
- import CapTree from '@capillarytech/blaze-ui';
30
-
31
- <CapTree>
32
- <CapTree.CapTreeNode title="Node 1" key="1">
33
- <CapTree.CapTreeNode title="Child 1" key="1-1" />
34
- </CapTree.CapTreeNode>
35
- </CapTree>
36
- ```
37
-
38
- **After (Recommended):**
39
-
40
- ```tsx
41
- import CapTree from '@capillarytech/blaze-ui';
42
-
43
- <CapTree
44
- treeData={[
45
- {
46
- title: 'Node 1',
47
- key: '1',
48
- children: [
49
- {
50
- title: 'Child 1',
51
- key: '1-1',
52
- },
53
- ],
54
- },
55
- ]}
56
- />
57
- ```
58
-
59
- ### `children` Prop (Ant Design Tree Component - TreeNode Pattern)
60
-
61
- - **Status:** ⚠️ Deprecated
62
- - **Ant Design Component:** Tree
63
- - **Deprecated Prop:** `children` prop (when used with TreeNode pattern)
64
- - **Replacement:** Use `treeData` prop instead
65
- - **Migration:** Pass tree structure via `treeData` prop instead of children
66
- - **Removal:** Will be removed in v10.0.0
67
-
68
- **Before (Deprecated):**
69
-
70
- ```tsx
71
- import CapTree from '@capillarytech/blaze-ui';
72
-
73
- <CapTree>
74
- <CapTree.CapTreeNode title="Node 1" key="1" />
75
- </CapTree>
76
- ```
77
-
78
- **After (Recommended):**
79
-
80
- ```tsx
81
- import CapTree from '@capillarytech/blaze-ui';
82
-
83
- <CapTree treeData={[{ title: 'Node 1', key: '1' }]} />
84
- ```
85
-
86
- **Note:** A deprecation warning will be shown in development mode when using TreeNode children instead of `treeData` prop.
87
-
88
- ## Deprecated APIs Summary
89
-
90
- | Deprecated API | Ant Design Component | Replacement | Removal Version |
91
- |----------------|---------------------|-------------|----------------|
92
- | `CapTree.CapTreeNode` component | Tree | `treeData` prop | v10.0.0 |
93
- | `children` prop (TreeNode pattern) | Tree | `treeData` prop | v10.0.0 |
94
-
95
- ## Backward Compatibility
96
-
97
- - `CapTree.CapTreeNode` is still exported and functional for backward compatibility
98
- - A deprecation warning will be shown in development mode when using `CapTreeNode`
99
- - A deprecation warning will be shown when using children instead of `treeData` prop
100
- - All existing code using TreeNode pattern will continue to work without modifications
101
-
102
- ## Theme Configuration
103
-
104
- Tree component styling is now handled via design tokens in `getCapThemeConfig.ts`:
105
-
106
- - `nodeHoverBg`: Background color on node hover (`#faf9f4`)
107
-
108
- ## Migration Guide
109
-
110
- 1. **Replace TreeNode children with treeData prop:**
111
- - Convert your TreeNode structure to a data array
112
- - Pass it via the `treeData` prop
113
-
114
- 2. **Update event handlers:**
115
- - All Tree event handlers remain the same (onSelect, onExpand, etc.)
116
-
117
- 3. **Styling:**
118
- - Custom styles are now handled via theme config
119
- - No SCSS overrides needed
120
-
121
- ## References
122
-
123
- - [Ant Design Tree Component](https://ant.design/components/tree)
124
- - [Ant Design v6 Migration Guide](https://ant.design/docs/react/migration-v6)