@capillarytech/blaze-ui 5.20.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 (189) hide show
  1. package/CapAskAira/CapAiMediaGeneration/saga.js +1446 -0
  2. package/CapAskAira/CapAiMediaGeneration/saga.js.map +1 -0
  3. package/CapCollapsibleLeftNavigation/saga.js +1441 -0
  4. package/CapCollapsibleLeftNavigation/saga.js.map +1 -0
  5. package/CapLanguageProvider/actions.js +125 -0
  6. package/CapLanguageProvider/actions.js.map +1 -0
  7. package/CapLanguageProvider/constants.js +37 -0
  8. package/CapLanguageProvider/constants.js.map +1 -0
  9. package/CapLanguageProvider/reducer.js +130 -0
  10. package/CapLanguageProvider/reducer.js.map +1 -0
  11. package/CapLanguageProvider/saga.js +1457 -0
  12. package/CapLanguageProvider/saga.js.map +1 -0
  13. package/CapLanguageProvider/selector.js +186 -0
  14. package/CapLanguageProvider/selector.js.map +1 -0
  15. package/CapSupportVideosWrapper/utils.js +34 -0
  16. package/CapSupportVideosWrapper/utils.js.map +1 -0
  17. package/package.json +1 -1
  18. package/CapActionBar/README.md +0 -11
  19. package/CapAdvancedIcon/README.md +0 -185
  20. package/CapAdvancedIcon/use-cases.md +0 -44
  21. package/CapAlert/README.md +0 -144
  22. package/CapAppNotEnabled/README.md +0 -84
  23. package/CapAskAira/README.md +0 -328
  24. package/CapBanner/README.md +0 -4
  25. package/CapBlock/README.md +0 -175
  26. package/CapBorderedBox/Status.md +0 -40
  27. package/CapCSVFileUploader/README.md +0 -124
  28. package/CapCSVFileUploader/Status.md +0 -47
  29. package/CapCard/README.md +0 -85
  30. package/CapCard/Status.md +0 -41
  31. package/CapCardBox/README.md +0 -169
  32. package/CapCardBox/Status.md +0 -52
  33. package/CapCarousel/README.md +0 -190
  34. package/CapCarousel/Status.md +0 -73
  35. package/CapCheckbox/README.md +0 -254
  36. package/CapCheckbox/Status.md +0 -41
  37. package/CapColorPicker/README.md +0 -112
  38. package/CapColorPicker/Status.md +0 -52
  39. package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
  40. package/CapColoredTag/README.md +0 -167
  41. package/CapColoredTag/Status.md +0 -49
  42. package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
  43. package/CapConditionPreview/README.md +0 -40
  44. package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
  45. package/CapCustomCard/README.md +0 -182
  46. package/CapCustomCard/Status.md +0 -40
  47. package/CapCustomCarousel/Status.md +0 -69
  48. package/CapCustomCheckboxList/README.md +0 -178
  49. package/CapCustomCheckboxList/Status.md +0 -52
  50. package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
  51. package/CapCustomList/README.md +0 -117
  52. package/CapCustomList/Status.md +0 -77
  53. package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
  54. package/CapCustomSelect/README.md +0 -38
  55. package/CapDatePicker/README.md +0 -139
  56. package/CapDateRangePicker/README.md +0 -159
  57. package/CapDateTimePicker/README.md +0 -136
  58. package/CapDateTimeRangePicker/README.md +0 -243
  59. package/CapDivider/README.md +0 -122
  60. package/CapDrawer/README.md +0 -207
  61. package/CapDrawer/Status.md +0 -52
  62. package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
  63. package/CapDropdown/README.md +0 -515
  64. package/CapDropdown/Status.md +0 -45
  65. package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
  66. package/CapError/README.md +0 -88
  67. package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
  68. package/CapErrorBoundary/README.md +0 -150
  69. package/CapErrorStateIllustration/README.md +0 -222
  70. package/CapErrorStateIllustration/USE_CASES.md +0 -33
  71. package/CapExpressionEditor/README.md +0 -32
  72. package/CapForm/README.md +0 -132
  73. package/CapForm/Status.md +0 -40
  74. package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
  75. package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
  76. package/CapFormItem/README.md +0 -320
  77. package/CapFormItem/Status.md +0 -73
  78. package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
  79. package/CapGraph/README.md +0 -69
  80. package/CapGraph/USE_CASES.md +0 -66
  81. package/CapHamburgerMenu/README.md +0 -234
  82. package/CapHamburgerMenu/USE_CASES.md +0 -48
  83. package/CapHeader/Status.md +0 -41
  84. package/CapHeading/README.md +0 -220
  85. package/CapHeading/Status.md +0 -41
  86. package/CapIcon/README.md +0 -207
  87. package/CapIllustration/Status.md +0 -41
  88. package/CapImage/README.md +0 -50
  89. package/CapImportMFEComponent/README.md +0 -121
  90. package/CapInfoNote/Status.md +0 -40
  91. package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
  92. package/CapInput/README.md +0 -196
  93. package/CapInput/Status.md +0 -123
  94. package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
  95. package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
  96. package/CapLanguageProvider/README.md +0 -206
  97. package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
  98. package/CapLevelGraphRenderer/README.md +0 -123
  99. package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
  100. package/CapLink/README.md +0 -203
  101. package/CapLink/Status.md +0 -32
  102. package/CapLink/tests/CapLink.missingUseCases.md +0 -95
  103. package/CapList/README.md +0 -129
  104. package/CapList/Status.md +0 -69
  105. package/CapListLayout/README.md +0 -7
  106. package/CapLogin/README.md +0 -7
  107. package/CapMenu/README.md +0 -86
  108. package/CapModal/README.md +0 -357
  109. package/CapModal/Status.md +0 -52
  110. package/CapModal/tests/USE_CASES_GAPS.md +0 -207
  111. package/CapMultiSelect/README.md +0 -170
  112. package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
  113. package/CapMultiSelectDatePicker/README.md +0 -11
  114. package/CapNavigation/README.md +0 -72
  115. package/CapNotification/README.md +0 -228
  116. package/CapNotificationDropdown/README.md +0 -5
  117. package/CapPopover/README.md +0 -234
  118. package/CapProgress/Status.md +0 -40
  119. package/CapRadio/Status.md +0 -54
  120. package/CapRadioButton/README.md +0 -152
  121. package/CapRadioButton/Status.md +0 -70
  122. package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
  123. package/CapRadioCard/README.md +0 -161
  124. package/CapRadioCard/Status.md +0 -78
  125. package/CapRadioGroup/README.md +0 -141
  126. package/CapRadioGroup/Status.md +0 -59
  127. package/CapReorderComponent/README.md +0 -179
  128. package/CapReorderComponent/Status.md +0 -41
  129. package/CapRoadMap/README.md +0 -126
  130. package/CapRoadMap/Status.md +0 -53
  131. package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
  132. package/CapRow/README.md +0 -424
  133. package/CapSKUUploader/README.md +0 -189
  134. package/CapSKUUploader/Status.md +0 -66
  135. package/CapSecondaryTopBar/README.md +0 -7
  136. package/CapSelect/README.md +0 -243
  137. package/CapSelectFilter/README.md +0 -121
  138. package/CapShape/README.md +0 -96
  139. package/CapShape/Status.md +0 -36
  140. package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
  141. package/CapSideBar/README.md +0 -298
  142. package/CapSideBar/Status.md +0 -5
  143. package/CapSlideBox/README.md +0 -68
  144. package/CapSlider/README.md +0 -423
  145. package/CapSlider/Status.md +0 -48
  146. package/CapSlider/tests/TEST_COVERAGE.md +0 -118
  147. package/CapSnackBar/README.md +0 -222
  148. package/CapSnackBar/Status.md +0 -41
  149. package/CapSomethingWentWrong/README.md +0 -97
  150. package/CapSplit/README.md +0 -19
  151. package/CapStatisticCard/README.md +0 -138
  152. package/CapStatus/README.md +0 -148
  153. package/CapStatus/Status.md +0 -40
  154. package/CapSteps/Status.md +0 -40
  155. package/CapStepsAccordian/README.md +0 -305
  156. package/CapStepsAccordian/Status.md +0 -48
  157. package/CapSupportVideosWrapper/README.md +0 -14
  158. package/CapSwitch/README.md +0 -351
  159. package/CapTab/README.md +0 -406
  160. package/CapTab/Status.md +0 -104
  161. package/CapTab/tests/USE_CASE_GAPS.md +0 -143
  162. package/CapTabV3/ANALYSIS.md +0 -60
  163. package/CapTabV3/README.md +0 -156
  164. package/CapTabV3/Status.md +0 -52
  165. package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
  166. package/CapTable/README.md +0 -160
  167. package/CapTable/Status.md +0 -41
  168. package/CapTag/README.md +0 -16
  169. package/CapTagDropdown/README.md +0 -171
  170. package/CapTagDropdown/Status.md +0 -55
  171. package/CapTimePicker/README.md +0 -170
  172. package/CapTooltip/README.md +0 -336
  173. package/CapTooltipWithInfo/Status.md +0 -75
  174. package/CapTopBar/README.md +0 -146
  175. package/CapTree/README.md +0 -124
  176. package/CapTree/Status.md +0 -48
  177. package/CapTree/tests/STATUS.md +0 -154
  178. package/CapTreeSelect/README.md +0 -217
  179. package/CapTreeSelect/Status.md +0 -52
  180. package/CapTruncateList/README.md +0 -13
  181. package/CapUnifiedSelect/README.md +0 -40
  182. package/CapUploader/README.md +0 -313
  183. package/CapUploader/Status.md +0 -76
  184. package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
  185. package/CapUserProfile/README.md +0 -105
  186. package/CapUserProfile/Status.md +0 -95
  187. package/CapVirtualList/README.md +0 -162
  188. package/CapVirtualList/Status.md +0 -71
  189. package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
@@ -1,105 +0,0 @@
1
- # CapUserProfile
2
-
3
- A component that displays a user profile slide box with user information, allowing users to view and edit their profile details including name, language preference, preferred organization, and preferred module.
4
-
5
- ## Migration Notes (cap-ui-library → blaze-ui)
6
-
7
- ### Summary of Changes
8
-
9
- This component has been migrated from cap-ui-library to blaze-ui with the following changes:
10
-
11
- 1. **TypeScript Conversion**: Converted from JavaScript to TypeScript with proper interfaces
12
- 2. **Functional Component**: Already a functional component, maintained with React hooks
13
- 3. **Styling**: Converted from SCSS to SCSS modules with CSS modules pattern
14
- 4. **Theme Config**: Moved Ant Design style overrides to `getCapThemeConfig.ts`
15
- 5. **PropTypes Removal**: Replaced PropTypes with TypeScript interfaces
16
-
17
- ### Breaking Changes
18
-
19
- **None** - No breaking changes from cap-ui-library v8.x
20
-
21
- ### Prop Changes
22
-
23
- All props remain the same:
24
-
25
- | Prop | Type | Default | Description |
26
- |------|------|---------|-------------|
27
- | `className` | `string` | `undefined` | Additional CSS class name |
28
- | `show` | `boolean` | `false` | Controls visibility of the user profile slide box |
29
- | `onClose` | `() => void` | `() => {}` | Callback function when the profile is closed |
30
- | `setShowUserProfile` | `(show: boolean) => void` | `undefined` | Function to set the visibility state of the user profile |
31
- | `userData` | `object` | `undefined` | User data object containing user information and organization details |
32
- | `language` | `object` | `undefined` | Language and locale details from Redux store |
33
- | `supportedLocalesDetails` | `object` | `undefined` | Supported locales details from Redux store |
34
-
35
- **Note**: The component also receives `intl` prop from `injectIntl` HOC and Redux props (`language`, `supportedLocalesDetails`) from `connect` HOC. These are handled internally and don't need to be passed explicitly.
36
-
37
- ### CSS/Styling Changes
38
-
39
- 1. **SCSS Modules**: Converted to CSS modules pattern:
40
- - Changed `import './styles.scss'` to `import styles from './styles.scss'`
41
- - Updated all `className` props to use `styles['class-name']` pattern
42
-
43
- 2. **Ant Design Overrides Removed**:
44
- - Removed `.ant-input` styles from component SCSS (per migration rules - no `.ant-` selectors allowed)
45
- - Removed `.ant-tabs-tabpane` styles from component SCSS
46
- - **Note**: The original component had component-specific Input border color (`#B3BAC5` / `CAP_G06`) scoped to `.user-profile-tab-input .ant-input`. This override was removed per migration rules. Inputs now use the global theme border color (`CAP_G07`).
47
- - Tabs tab pane border removal moved to `getCapThemeConfig.ts` under `components.Tabs.itemBorderColor`
48
-
49
- 3. **Global Utility Classes**: The component uses some global utility classes that are preserved for backward compatibility:
50
- - `pointer-cursor` - Global utility class
51
- - `ml-8` - Global margin utility class
52
- - `mt-4` - Global margin utility class
53
- - `text-align-left` - Global text alignment utility class
54
-
55
- ### Theme Config Updates
56
-
57
- The following theme config updates were made in `getCapThemeConfig.ts`:
58
-
59
- **Input Component**:
60
- - `colorBorder`: Updated to `CAP_G06` (`#b3bac5`) to match CapUserProfile design requirements
61
-
62
- **Tabs Component**:
63
- - `itemBorderColor`: Set to `'transparent'` to remove tab pane borders
64
-
65
- ### Behavioral Changes
66
-
67
- 1. **CSS Modules**: Class names are now scoped via CSS modules, but backward compatibility is maintained through the same class name structure
68
- 2. **Theme-based Styling**: Ant Design component styling is now controlled via theme config instead of SCSS overrides
69
-
70
- ### Usage
71
-
72
- ```tsx
73
- import { CapUserProfile } from '@capillarytech/blaze-ui';
74
-
75
- <CapUserProfile
76
- show={isProfileVisible}
77
- onClose={() => setIsProfileVisible(false)}
78
- setShowUserProfile={setIsProfileVisible}
79
- userData={{
80
- user: {
81
- id: '12345',
82
- firstName: 'John',
83
- lastName: 'Doe',
84
- loginName: 'john.doe@example.com',
85
- accessRoles: ['STANDARD_USER'],
86
- },
87
- }}
88
- />
89
- ```
90
-
91
- ### Component Structure
92
-
93
- The component consists of:
94
- - **CapUserProfile** (main component): Displays the slide box with user header and profile tab
95
- - **UserProfileTab** (sub-component): Displays and allows editing of profile details
96
-
97
- Both components use CSS modules for styling and are fully TypeScript typed.
98
-
99
- ### Dependencies
100
-
101
- - `react-intl` - For internationalization
102
- - `react-redux` - For Redux store access
103
- - `reselect` - For memoized selectors
104
- - Ant Design v6 components (via `antd-v5` alias)
105
- - Other Cap UI components from blaze-ui
@@ -1,95 +0,0 @@
1
- # Migration Status: CapUserProfile
2
-
3
- **Last Updated**: 2026-02-23 13:18:34
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 1.5**: Export component in blaze-ui/components/index.ts
10
- - [x] **Step 2**: Migration Prompt 2 (Storybook support)
11
- - [x] **Step 2.5**: Verify deprecated props and prop changes (REQUIRED - enforced)
12
- - [x] **Step 3**: Migration Prompt 3 (Unit tests)
13
- - [x] **Step 4**: Migration Prompt 4 (Visual test cases)
14
- - [x] **Step 5**: Linting (ESLint)
15
- - [x] **Step 6**: Pre-build Validation
16
- - [x] **Step 7**: Build blaze-ui
17
- - [x] **Step 8**: Visual Testing
18
- - [x] **Step 8.1**: Pre-visual-test check (agent verification)
19
- - [x] **Step 8.2**: Visual comparison
20
- - [x] **Step 8.3**: Visual diff analysis (agent analysis)
21
- - [x] **Step 9**: CSS Analysis (if mismatches found)
22
- - [ ] **Step 9.5**: CSS Analysis Completed
23
- - [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
24
- - [x] **Step 11**: Create Pull Request
25
-
26
- ## Deprecated Props Verification
27
-
28
- _No deprecated props verification results yet._
29
-
30
- **Note**: Step 2.5 is REQUIRED and enforced.
31
- - Focus: **Ant Design component prop changes** (e.g., Dropdown, Input, Alert, Tooltip, etc.)
32
- - Reference: MIGRATION_CHANGELOG_TEMPLATE.md for format, ANTD_V6_MIGRATION.md for Ant Design deprecated APIs
33
- - Skip: If original component doesn't exist in cap-ui-library
34
- - All deprecated Ant Design props and prop changes must be documented before proceeding.
35
-
36
- ## Visual Testing Results
37
-
38
- **Last Test**: 2026-02-23 13:17:07
39
- **Report**: `/tools/visual-testing/report/CapUserProfile/index.html`
40
- **Maximum Mismatch**: 0.11% (969 pixels)
41
- **Threshold**: 1.5%
42
- **Status**: ✅ All variants passing (below threshold)
43
-
44
- ### Variant Results:
45
- - ✅ **default**: 0.11% (969 pixels) - Pass
46
- - ✅ **org-owner**: 0.11% (969 pixels) - Pass
47
- - ✅ **admin-user**: 0.11% (969 pixels) - Pass
48
- - ✅ **standard-user**: 0.11% (969 pixels) - Pass
49
- - ✅ **empty-data**: 0.11% (969 pixels) - Pass
50
- - ✅ **long-content**: 0.11% (969 pixels) - Pass
51
- - ✅ **custom-classname**: 0.11% (969 pixels) - Pass
52
- - ✅ **single-name**: 0.11% (969 pixels) - Pass
53
-
54
- ### Analysis:
55
- All variants show **identical** visual differences (969 pixels, 0.11%), indicating a **systematic rendering issue** in base component structure. While passing the threshold, this should be investigated.
56
-
57
- **See detailed analysis**: `VISUAL_DIFF_ANALYSIS.md`
58
-
59
-
60
- ## CSS Fixes Applied
61
-
62
- ### Identified Issues:
63
- 1. **Inline style usage** (Priority: High)
64
- - Location: `index.tsx:64-66`
65
- - Issue: Background color set via inline style
66
- - Action: Move to CSS class per coding standards
67
-
68
- 2. **CapRow/CapColumn flex props** (Priority: High)
69
- - Location: `index.tsx:61`
70
- - Issue: Verify `type="flex"` and `align="middle"` v6 compatibility
71
- - Action: Review CapRow/CapColumn v6 implementation
72
-
73
- 3. **CapSlideBox rendering** (Priority: High)
74
- - Location: `index.tsx:133-141`
75
- - Issue: Verify `showShadow` and `size="size-r"` v6 compatibility
76
- - Action: Review CapSlideBox v6 implementation
77
-
78
- ### Fixes Pending:
79
- - [ ] Remove inline style, move to CSS class
80
- - [ ] Verify CapRow/CapColumn v6 compatibility
81
- - [ ] Verify CapSlideBox v6 compatibility
82
- - [ ] Verify CapTab panes prop structure
83
-
84
- ## Notes
85
-
86
- **Visual Diff Analysis Completed**: 2026-02-23
87
- **Analysis Document**: `VISUAL_DIFF_ANALYSIS.md`
88
-
89
- **Key Findings:**
90
- - All 8 variants show identical 0.11% difference (969 pixels)
91
- - Difference is systematic, affecting all variants equally
92
- - Well below 1.5% threshold - all tests passing
93
- - Likely causes: flex layout changes, container spacing, or subpixel rendering
94
- - Recommended fixes: Remove inline styles, verify base component v6 compatibility
95
-
@@ -1,162 +0,0 @@
1
- # CapVirtualList
2
-
3
- A wrapper component around `react-virtuoso`'s `Virtuoso` component that provides virtualized list rendering for large datasets.
4
-
5
- ## Migration from cap-ui-library
6
-
7
- This component has been migrated from `@capillarytech/cap-ui-library` to `@capillarytech/blaze-ui` with the following changes:
8
-
9
- ### Breaking Changes
10
-
11
- **No breaking changes** - The component maintains backward compatibility with the previous version.
12
-
13
- ### Deprecated Props
14
-
15
- **No Ant Design deprecated props** - This component does not use any Ant Design components.
16
-
17
- CapVirtualList is a direct wrapper around `react-virtuoso`'s `Virtuoso` component and does not consume any Ant Design components (e.g., Dropdown, Input, Alert, Tooltip, Tabs, etc.). Therefore, there are no Ant Design prop deprecations to document.
18
-
19
- **Note:** For information about deprecated props in `react-virtuoso`, please refer to the [react-virtuoso documentation](https://virtuoso.dev/).
20
-
21
- ### Prop Changes
22
-
23
- | Prop | Status | Notes |
24
- |------|--------|-------|
25
- | All `react-virtuoso` Virtuoso props | ✅ Unchanged | All props are passed through to the underlying `Virtuoso` component |
26
- | `totalCount` | ✅ Unchanged | Total number of items in the list |
27
- | `itemContent` | ✅ Unchanged | Function to render each item: `(index: number, item?: unknown) => ReactNode` |
28
- | `data` | ✅ Unchanged | Array of data items (optional) |
29
- | `style` | ✅ Unchanged | Inline styles for the list container |
30
- | `className` | ✅ Unchanged | CSS class name for the list container |
31
- | `itemHeight` | ✅ Unchanged | Fixed height for each item in pixels (optional) |
32
- | `endReached` | ✅ Unchanged | Callback function called when user scrolls to the end |
33
- | `components` | ✅ Unchanged | Custom components for the list (e.g., EmptyPlaceholder) |
34
-
35
- **For complete prop documentation, refer to:** [react-virtuoso documentation](https://virtuoso.dev/)
36
-
37
- ### API Changes
38
-
39
- - **TypeScript Support:** Full TypeScript support with exported `CapVirtualListProps` interface
40
- - **Ant Design Components:** None - This component does not use Ant Design
41
- - **Styling:** No custom styling - uses `react-virtuoso`'s default styles
42
-
43
- ### Behavioral Changes
44
-
45
- - **No behavioral changes** - The component functions identically to the previous version
46
- - All props are passed directly to the underlying `Virtuoso` component from `react-virtuoso`
47
-
48
- ### Usage Examples
49
-
50
- #### Basic Usage
51
-
52
- ```tsx
53
- import { CapVirtualList } from '@capillarytech/blaze-ui';
54
-
55
- <CapVirtualList
56
- totalCount={1000}
57
- style={{ height: '400px', width: '100%' }}
58
- itemContent={(index) => (
59
- <div style={{ padding: '12px', borderBottom: '1px solid #e8e8e8' }}>
60
- Item {index + 1}
61
- </div>
62
- )}
63
- />
64
- ```
65
-
66
- #### With Data Array
67
-
68
- ```tsx
69
- import { CapVirtualList } from '@capillarytech/blaze-ui';
70
-
71
- const data = Array.from({ length: 1000 }, (_, i) => ({
72
- id: i + 1,
73
- name: `Item ${i + 1}`,
74
- description: `Description for item ${i + 1}`,
75
- }));
76
-
77
- <CapVirtualList
78
- totalCount={data.length}
79
- data={data}
80
- style={{ height: '500px', width: '100%' }}
81
- itemContent={(index, item) => (
82
- <div style={{ padding: '16px', borderBottom: '1px solid #e8e8e8' }}>
83
- <div style={{ fontWeight: 'bold' }}>{item?.name}</div>
84
- <div style={{ fontSize: '12px', color: '#666' }}>{item?.description}</div>
85
- </div>
86
- )}
87
- />
88
- ```
89
-
90
- #### With Fixed Item Height
91
-
92
- ```tsx
93
- import { CapVirtualList } from '@capillarytech/blaze-ui';
94
-
95
- <CapVirtualList
96
- totalCount={1000}
97
- itemHeight={60}
98
- style={{ height: '400px', width: '100%' }}
99
- itemContent={(index) => (
100
- <div style={{ padding: '16px' }}>
101
- Item {index + 1}
102
- </div>
103
- )}
104
- />
105
- ```
106
-
107
- #### With End Reached Callback
108
-
109
- ```tsx
110
- import { CapVirtualList } from '@capillarytech/blaze-ui';
111
- import { useState } from 'react';
112
-
113
- function InfiniteList() {
114
- const [items, setItems] = useState(Array.from({ length: 100 }, (_, i) => i + 1));
115
-
116
- const handleEndReached = () => {
117
- // Load more items
118
- const newItems = Array.from(
119
- { length: 20 },
120
- (_, i) => items.length + i + 1
121
- );
122
- setItems([...items, ...newItems]);
123
- };
124
-
125
- return (
126
- <CapVirtualList
127
- totalCount={items.length}
128
- data={items}
129
- style={{ height: '400px', width: '100%' }}
130
- itemContent={(index) => (
131
- <div style={{ padding: '12px' }}>Item {items[index]}</div>
132
- )}
133
- endReached={handleEndReached}
134
- />
135
- );
136
- }
137
- ```
138
-
139
- ### TypeScript
140
-
141
- ```tsx
142
- import { CapVirtualList, CapVirtualListProps } from '@capillarytech/blaze-ui';
143
-
144
- const props: CapVirtualListProps = {
145
- totalCount: 1000,
146
- style: { height: '400px', width: '100%' },
147
- itemContent: (index) => <div>Item {index + 1}</div>,
148
- };
149
-
150
- <CapVirtualList {...props} />
151
- ```
152
-
153
- ### Migration Steps for Consumers
154
-
155
- **No migration steps required** - The component API is identical to the previous version.
156
-
157
- All existing code using `CapVirtualList` from `cap-ui-library` will work without any changes.
158
-
159
- ### Related Documentation
160
-
161
- - [react-virtuoso Documentation](https://virtuoso.dev/)
162
- - [react-virtuoso GitHub Repository](https://github.com/petyosi/react-virtuoso)
@@ -1,71 +0,0 @@
1
- # Migration Status: CapVirtualList
2
-
3
- **Last Updated**: 2026-02-06 12:46:31
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 1.5**: Export component in blaze-ui/components/index.ts
10
- - [x] **Step 2**: Migration Prompt 2 (Storybook support)
11
- - [x] **Step 2.5**: Verify deprecated props and prop changes (REQUIRED - enforced)
12
- - [x] **Step 3**: Migration Prompt 3 (Unit tests)
13
- - [x] **Step 4**: Migration Prompt 4 (Visual test cases)
14
- - [x] **Step 5**: Linting (ESLint)
15
- - [x] **Step 6**: Pre-build Validation
16
- - [x] **Step 7**: Build blaze-ui
17
- - [ ] **Step 8**: Visual Testing
18
- - [ ] **Step 9**: CSS Analysis (if mismatches found)
19
- - [ ] **Step 9.5**: CSS Analysis Completed
20
- - [ ] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
21
- - [ ] **Step 11**: Create Pull Request
22
-
23
- ## Deprecated Props Verification
24
-
25
- ✅ **Verification Complete** - 2026-02-06
26
-
27
- ### Summary
28
- **No Ant Design deprecated props** - CapVirtualList does not use any Ant Design components.
29
-
30
- ### Verification Details
31
-
32
- 1. **Ant Design Components Used:** None
33
- - Component only uses `react-virtuoso`'s `Virtuoso` component
34
- - No imports from `antd` or `@ant-design` packages
35
- - Verified by checking imports in `index.tsx` and `types.ts`
36
-
37
- 2. **Deprecated Props:** None
38
- - No Ant Design components = No Ant Design deprecated props
39
- - Component is a direct wrapper around `react-virtuoso`'s `Virtuoso` component
40
-
41
- 3. **Documentation:** ✅ Complete
42
- - README.md created with "Deprecated Props" section
43
- - Clearly documents that no Ant Design components are used
44
- - References `react-virtuoso` documentation for prop information
45
-
46
- 4. **Backward Compatibility:** ✅ N/A
47
- - No Ant Design props to maintain backward compatibility for
48
- - Component API unchanged from original version
49
-
50
- ### Files Updated
51
- - ✅ `README.md` - Added "Deprecated Props" section documenting no Ant Design components are used
52
- - ✅ `Status.md` - Updated with verification results
53
-
54
- **Note**: Step 2.5 is REQUIRED and enforced.
55
- - Focus: **Ant Design component prop changes** (e.g., Dropdown, Input, Alert, Tooltip, etc.)
56
- - Reference: MIGRATION_CHANGELOG_TEMPLATE.md for format, ANTD_V6_MIGRATION.md for Ant Design deprecated APIs
57
- - Skip: If original component doesn't exist in cap-ui-library
58
- - All deprecated Ant Design props and prop changes must be documented before proceeding.
59
-
60
- ## Visual Testing Results
61
-
62
- _No visual testing results yet._
63
-
64
- ## CSS Fixes Applied
65
-
66
- _No CSS fixes applied yet._
67
-
68
- ## Notes
69
-
70
- _No notes yet._
71
-
@@ -1,230 +0,0 @@
1
- # ComponentWithLabelHOC Migration Guide
2
-
3
- ## Summary
4
-
5
- ComponentWithLabelHOC has been migrated from `cap-ui-library` to `blaze-ui` with the following changes:
6
-
7
- - Converted from styled-components to SCSS modules
8
- - Converted from JavaScript to TypeScript
9
- - Converted from class component to functional component with React hooks
10
- - Added TypeScript interfaces for props
11
- - Maintained backward compatibility with the existing API
12
-
13
- ## Breaking Changes
14
-
15
- **No breaking changes from cap-ui-library v8.x**
16
-
17
- The API remains identical to the original implementation. All existing props and behaviors are maintained.
18
-
19
- ## Prop Changes
20
-
21
- | Prop | Type | Default | Status | Notes |
22
- |------|------|---------|--------|-------|
23
- | `label` | `React.ReactNode` | - | Unchanged | Label text to display |
24
- | `labelPosition` | `'top' \| 'left'` | `'top'` | Unchanged | Position of label relative to component |
25
- | `isRequired` | `boolean` | `false` | Unchanged | Shows asterisk when true |
26
- | `inductiveText` | `string` | - | Unchanged | Helper text displayed below label |
27
- | `errorMessage` | `string` | - | Unchanged | Error message displayed below component |
28
- | `disabled` | `boolean` | `false` | Unchanged | Disables the component |
29
- | `inline` | `boolean` | `false` | Unchanged | Displays component inline |
30
- | `componentPosition` | `'top' \| 'center'` | - | Unchanged | Position when labelPosition is 'left' |
31
- | `className` | `string` | - | Unchanged | Additional CSS class name |
32
- | `focusOnMount` | `boolean` | `false` | Unchanged | Focuses input on mount |
33
-
34
- ### New TypeScript Types
35
-
36
- ```typescript
37
- type LabelPosition = 'top' | 'left';
38
- type ComponentPosition = 'top' | 'center';
39
-
40
- interface ComponentWithLabelProps {
41
- label?: React.ReactNode;
42
- labelPosition?: LabelPosition;
43
- isRequired?: boolean;
44
- inductiveText?: string;
45
- errorMessage?: string;
46
- disabled?: boolean;
47
- inline?: boolean;
48
- componentPosition?: ComponentPosition;
49
- className?: string;
50
- focusOnMount?: boolean;
51
- [key: string]: unknown;
52
- }
53
-
54
- type ComponentWithLabelHOC = <P extends WrappedComponentProps>(
55
- Component: React.ComponentType<P>
56
- ) => React.ComponentType<ComponentWithLabelProps & Omit<P, keyof WrappedComponentProps>>;
57
- ```
58
-
59
- ## API Changes
60
-
61
- ### Functional Component (New)
62
-
63
- The HOC now uses React hooks internally (`useEffect`, `useRef`) instead of class component lifecycle methods. This is an internal change and does not affect the public API.
64
-
65
- ### TypeScript Support (New)
66
-
67
- The HOC is now fully typed with TypeScript, providing better IDE support and type safety:
68
-
69
- ```tsx
70
- import ComponentWithLabelHOC from '@capillarytech/blaze-ui/components/assets/HOCs/ComponentWithLabelHOC';
71
- import { Input } from 'antd';
72
-
73
- const InputWithLabel = ComponentWithLabelHOC(Input);
74
-
75
- // TypeScript will infer and validate all props
76
- <InputWithLabel
77
- label="Username"
78
- labelPosition="top"
79
- isRequired
80
- errorMessage={errors.username}
81
- />
82
- ```
83
-
84
- ## Behavioral Changes
85
-
86
- - **Styling**: Styles are now applied via CSS Modules instead of styled-components, improving performance and maintainability
87
- - **Error State**: Error styling is now applied via conditional CSS classes rather than inline styles
88
- - **Focus Management**: Focus on mount now uses React refs and useEffect instead of componentDidMount
89
-
90
- ## Migration Notes
91
-
92
- ### Non-Tokenizable Overrides
93
-
94
- Most Antd style overrides in this HOC are conditional based on props (`errorMessage`, `labelPosition`) and layout-specific calculations. These cannot be tokenized and are handled via CSS Modules with conditional classes:
95
-
96
- 1. **Conditional Border Colors**: Border colors change based on `errorMessage` prop - handled via conditional CSS classes (`--error` vs `--normal`)
97
- 2. **Width Calculations**: Width calculations based on `labelPosition` (`calc(100% - 140px)`) - layout-specific, cannot be tokenized
98
- 3. **Prefix/Suffix Positioning**: Absolute positioning of prefix/suffix icons (8px) - layout-specific, cannot be tokenized
99
- 4. **Box Shadow Override**: `box-shadow: none` to remove Antd's default shadow - intentional override, cannot be tokenized
100
-
101
- ### :global Overrides
102
-
103
- The following overrides use `:global` with mandatory `// OVERRIDE:` comments:
104
-
105
- 1. **Placeholder Font Size**: Applied to `::-webkit-input-placeholder` pseudo-element - cannot be tokenized for pseudo-elements
106
- 2. **Antd Component Selectors**: Direct Antd class selectors (`.ant-input`, `.ant-input-number`, `.ant-select`) - required for styling wrapped Antd components
107
-
108
- All `:global` blocks include comments explaining why tokenization is not possible.
109
-
110
- ## Usage
111
-
112
- ### Basic Usage
113
-
114
- ```tsx
115
- import ComponentWithLabelHOC from '@capillarytech/blaze-ui/components/assets/HOCs/ComponentWithLabelHOC';
116
- import { Input } from 'antd';
117
-
118
- const InputWithLabel = ComponentWithLabelHOC(Input);
119
-
120
- function MyForm() {
121
- return (
122
- <InputWithLabel
123
- label="Email"
124
- labelPosition="top"
125
- isRequired
126
- errorMessage={errors.email}
127
- />
128
- );
129
- }
130
- ```
131
-
132
- ### Left Label Position
133
-
134
- ```tsx
135
- <InputWithLabel
136
- label="Username"
137
- labelPosition="left"
138
- componentPosition="center"
139
- isRequired
140
- />
141
- ```
142
-
143
- ### With Inductive Text
144
-
145
- ```tsx
146
- <InputWithLabel
147
- label="Password"
148
- labelPosition="top"
149
- inductiveText="Must be at least 8 characters"
150
- isRequired
151
- />
152
- ```
153
-
154
- ### Focus on Mount
155
-
156
- ```tsx
157
- <InputWithLabel
158
- label="Search"
159
- focusOnMount
160
- />
161
- ```
162
-
163
- ## Files Structure
164
-
165
- ```
166
- blaze-ui/components/assets/HOCs/ComponentWithLabelHOC/
167
- ├── index.tsx # Main HOC component (CSS Modules)
168
- ├── types.ts # TypeScript interfaces and types
169
- ├── styles.scss # SCSS module styles
170
- └── README.md # This file
171
- ```
172
-
173
- ## Import Paths
174
-
175
- ### Recommended (New Location)
176
-
177
- ```tsx
178
- import ComponentWithLabelHOC from '@capillarytech/blaze-ui/components/assets/HOCs/ComponentWithLabelHOC';
179
- // or
180
- import ComponentWithLabelHOC from '../assets/HOCs/ComponentWithLabelHOC';
181
- ```
182
-
183
- ### Backward Compatible (Old Location)
184
-
185
- ```tsx
186
- // These imports still work for backward compatibility
187
- import ComponentWithLabelHOC from '@capillarytech/blaze-ui/components/assets/HOCs/ComponentWithLabelHOC';
188
- import ComponentWithLabelHOC from '../assets/HOCs/ComponentWithLabelHOC';
189
- ```
190
-
191
- Both import paths work due to backward compatibility re-exports.
192
-
193
- ## Technical Details
194
-
195
- ### CSS Modules Approach
196
-
197
- All styles use CSS Modules with the `styles[classname]` pattern:
198
-
199
- ```tsx
200
- import styles from './styles.scss';
201
-
202
- <div className={styles['component-with-label']}>
203
- ```
204
-
205
- ### Conditional Classes
206
-
207
- Error states and label positions are handled via conditional CSS classes:
208
-
209
- ```tsx
210
- className={classnames(styles[classPrefix], {
211
- [styles[`${classPrefix}--error`]]: !!errorMessage,
212
- [styles[`${classPrefix}--normal`]]: !errorMessage,
213
- [styles[`${classPrefix}--label-left`]]: labelPosition === 'left',
214
- })}
215
- ```
216
-
217
- ### SCSS Variables
218
-
219
- All spacing, colors, and font sizes use SCSS variables from `components/styles/_variables.scss`:
220
-
221
- - `$CAP_SPACE_*` for spacing
222
- - `$CAP_G*` for grey colors
223
- - `$CAP_RED` for error color
224
- - `$FONT_SIZE_*` for font sizes
225
-
226
- ## Related Components
227
-
228
- - `CapHeading` - Used for label rendering
229
- - `CapInput` - Commonly wrapped component
230
- - `CapSelect` - Commonly wrapped component