@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,222 +0,0 @@
1
- # CapSnackBar
2
-
3
- A wrapper API around Ant Design's Message component that provides consistent styling and a simplified API for showing snackbar messages in Capillary applications.
4
-
5
- ## Migration from cap-ui-library to blaze-ui
6
-
7
- This component has been migrated from `cap-ui-library` to `blaze-ui` with the following changes:
8
-
9
- ### Summary of Changes
10
-
11
- - **Style Migration**: Moved all Ant Design style overrides from SCSS `:global` selectors to theme tokens in `getCapThemeConfig.ts`
12
- - **SCSS Import**: Updated to use `import * as styles` pattern (instead of `import styles`)
13
- - **No Breaking Changes**: The component API remains 100% backward compatible
14
-
15
- ### Breaking Changes
16
-
17
- **No breaking changes from cap-ui-library v8.x**
18
-
19
- The component maintains **100% backward compatibility**. All existing code will continue to work without modifications.
20
-
21
- ### Deprecated Props
22
-
23
- **No deprecated Ant Design props**
24
-
25
- CapSnackBar does not expose Ant Design component props directly to users. The component wraps Ant Design's **Message** API internally and only exposes Cap component props (`content`, `showCloseIcon`, `duration`, `onClose`).
26
-
27
- #### Ant Design Message Component
28
-
29
- - **Ant Design Component:** Message (imperative API)
30
- - **Status:** ✅ No deprecated props
31
- - **Reason:** CapSnackBar wraps the Message API and does not expose Ant Design props directly. All Ant Design Message API calls use the correct v6 object-based API internally.
32
-
33
- **Internal Implementation Note:** The component internally uses Ant Design Message's object-based API (`message[type]({ content, duration, onClose })`), which is the correct v6 API. The deprecated positional argument API (`message[type](content, duration, onClose)`) is not used.
34
-
35
- **What this means for users:**
36
- - No migration needed - CapSnackBar props remain unchanged
37
- - No deprecated Ant Design props to migrate
38
- - The component handles all Ant Design v6 API changes internally
39
-
40
- ### Style Changes
41
-
42
- **Before (cap-ui-library)**:
43
- - Used `:global` SCSS selectors to override Ant Design's `.ant-message-*` classes
44
- - Direct CSS overrides for padding, min-height, and background colors
45
-
46
- **After (blaze-ui)**:
47
- - All style overrides moved to Ant Design theme tokens in `getCapThemeConfig.ts`
48
- - Custom component styles (`.cap-snackbar-content`) remain in SCSS
49
- - Theme tokens control:
50
- - Content padding (horizontal: 16px, vertical: 12px)
51
- - Type-specific background colors (success, info, warning, error)
52
-
53
- ### Code Improvements
54
-
55
- 1. **Removed `:global` styles**: All Ant Design overrides now use theme tokens
56
- 2. **Removed `.ant-*` selectors**: No direct CSS overrides of Ant Design classes
57
- 3. **Token-based theming**: Background colors and padding controlled through `components.Message` tokens
58
- 4. **SCSS import pattern**: Updated to `import * as styles` for consistency
59
-
60
- ### What Stayed the Same
61
-
62
- - All API methods (`info`, `success`, `error`, `warning`)
63
- - Props interface (`CapSnackBarProps`)
64
- - Close icon functionality
65
- - Duration handling
66
- - `onClose` callback behavior
67
- - Component structure and DOM hierarchy
68
-
69
- ### What Changed
70
-
71
- - **Removed**: `:global` SCSS blocks targeting `.ant-message-*` classes
72
- - **Removed**: Direct CSS overrides for Ant Design Message component
73
- - **Added**: Theme token configuration in `getCapThemeConfig.ts`
74
- - **Updated**: SCSS import pattern (`import * as styles`)
75
-
76
- ## Usage
77
-
78
- ### Basic Usage
79
-
80
- ```typescript
81
- import CapSnackBar from '@capillarytech/blaze-ui/components/CapSnackBar';
82
-
83
- // Success snackbar
84
- CapSnackBar.success({
85
- content: 'Operation completed successfully!',
86
- });
87
-
88
- // Error snackbar
89
- CapSnackBar.error({
90
- content: 'Something went wrong. Please try again.',
91
- });
92
-
93
- // Info snackbar
94
- CapSnackBar.info({
95
- content: 'Here is some important information.',
96
- });
97
-
98
- // Warning snackbar
99
- CapSnackBar.warning({
100
- content: 'Please be careful with this action.',
101
- });
102
- ```
103
-
104
- ### With Close Icon
105
-
106
- ```typescript
107
- CapSnackBar.info({
108
- content: 'This message can be manually closed',
109
- showCloseIcon: true,
110
- });
111
- ```
112
-
113
- ### With Custom Duration
114
-
115
- ```typescript
116
- CapSnackBar.success({
117
- content: 'This message will stay for 5 seconds',
118
- duration: 5, // Duration in seconds
119
- });
120
- ```
121
-
122
- ### With Close Callback
123
-
124
- ```typescript
125
- CapSnackBar.info({
126
- content: 'Message with callback',
127
- onClose: () => {
128
- console.log('Snackbar closed');
129
- },
130
- });
131
- ```
132
-
133
- ### With All Options
134
-
135
- ```typescript
136
- CapSnackBar.success({
137
- content: 'Complete example',
138
- showCloseIcon: true,
139
- duration: 3,
140
- onClose: () => {
141
- console.log('Closed');
142
- },
143
- });
144
- ```
145
-
146
- ### With React Node Content
147
-
148
- ```typescript
149
- CapSnackBar.info({
150
- content: (
151
- <div>
152
- <strong>Bold text</strong>
153
- <span> and regular text</span>
154
- </div>
155
- ),
156
- });
157
- ```
158
-
159
- ## API Reference
160
-
161
- ### CapSnackBar Methods
162
-
163
- | Method | Description | Parameters |
164
- |--------|-------------|------------|
165
- | `info` | Display an info snackbar | `CapSnackBarProps` |
166
- | `success` | Display a success snackbar | `CapSnackBarProps` |
167
- | `error` | Display an error snackbar | `CapSnackBarProps` |
168
- | `warning` | Display a warning snackbar | `CapSnackBarProps` |
169
-
170
- ### CapSnackBarProps
171
-
172
- | Prop | Type | Default | Description |
173
- |------|------|---------|-------------|
174
- | `content` | `React.ReactNode` | **Required** | Content to display in the snackbar |
175
- | `showCloseIcon` | `boolean` | `false` | Whether to show a close icon. When `true`, duration is set to 1000 seconds |
176
- | `duration` | `number` | `1.5` | Duration in seconds before auto-closing |
177
- | `onClose` | `() => void` | `undefined` | Callback function called when snackbar is closed |
178
-
179
- ## Migration Guide
180
-
181
- ### From cap-ui-library
182
-
183
- No migration required! The component API is fully backward compatible. If you're already using `CapSnackBar` from cap-ui-library, you can simply update your imports:
184
-
185
- **Before (cap-ui-library)**:
186
- ```typescript
187
- import CapSnackBar from '@capillarytech/cap-ui-library/components/CapSnackBar';
188
- ```
189
-
190
- **After (blaze-ui)**:
191
- ```typescript
192
- import CapSnackBar from '@capillarytech/blaze-ui/components/CapSnackBar';
193
- ```
194
-
195
- All existing code will continue to work without any changes.
196
-
197
- ## Theme Configuration
198
-
199
- The component uses Ant Design theme tokens configured in `getCapThemeConfig.ts`:
200
-
201
- ```typescript
202
- Message: {
203
- paddingContentHorizontal: 16, // px
204
- paddingContentVertical: 12, // px
205
- colorSuccessBg: '#dbefda',
206
- colorInfoBg: '#fff4d6',
207
- colorWarningBg: '#fee5d3',
208
- colorErrorBg: '#fbd3d8',
209
- }
210
- ```
211
-
212
- ## Notes
213
-
214
- - When `showCloseIcon` is `true`, the duration is automatically set to 1000 seconds to allow manual closing
215
- - The component wraps content in a `<div className="cap-snackbar-content">` when `showCloseIcon` is enabled
216
- - The close icon is positioned absolutely on the right side of the content
217
- - All snackbar types (info, success, error, warning) use the same API structure
218
-
219
- ## Related Components
220
-
221
- - `CapNotification` - For more complex notification messages with titles and descriptions
222
- - `CapAlert` - For inline alert messages
@@ -1,41 +0,0 @@
1
- # Migration Status: CapSnackBar
2
-
3
- **Last Updated**: 2026-02-06 21:19:14
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 3**: Migration Prompt 3 (Unit tests)
12
- - [x] **Step 4**: Migration Prompt 4 (Visual test cases)
13
- - [x] **Step 5**: Linting (ESLint)
14
- - [x] **Step 6**: Pre-build Validation
15
- - [x] **Step 7**: Build blaze-ui
16
- - [x] **Step 8**: Visual Testing
17
- - [x] **Step 9**: CSS Analysis (if mismatches found)
18
- - [x] **Step 9.5**: CSS Analysis Completed
19
- - [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
20
- - [x] **Step 11**: Create Pull Request
21
-
22
- ## Visual Testing Results
23
-
24
- **Last Test**: 2026-02-06 21:19:14
25
- **Maximum Mismatch**: 0%
26
-
27
- ### Mismatched Variants:
28
- -
29
-
30
-
31
- ## CSS Fixes Applied
32
-
33
- **Date**: 2026-02-06 20:52:47
34
- **Summary**: CSS fixes applied based on visual testing analysis.
35
-
36
- _See full analysis in: `/Users/sarahkhader/repos/migration/blaze-ui/tools/visual-testing/report/CapSnackBar/css-fix-analysis.md`_
37
-
38
-
39
- ## Notes
40
-
41
- _No notes yet._
@@ -1,97 +0,0 @@
1
- # CapSomethingWentWrong
2
-
3
- A component that displays an error message with a repair illustration when something goes wrong, allowing users to reload or navigate to a different URL.
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, no conversion needed
13
- 3. **Styling**: Converted from styled-components to SCSS modules
14
- 4. **Dependencies**: Uses migrated `CapHeading` and `CapButton` components from blaze-ui
15
-
16
- ### Breaking Changes
17
-
18
- **None** - No breaking changes from cap-ui-library v8.x
19
-
20
- ### Prop Changes
21
-
22
- All props remain the same:
23
-
24
- | Prop | Type | Default | Description |
25
- |------|------|---------|-------------|
26
- | `className` | `string` | `undefined` | Additional CSS class name for the container |
27
- | `titleClassName` | `string` | `undefined` | Additional CSS class name for the title heading |
28
- | `descClassName` | `string` | `undefined` | Additional CSS class name for the description heading |
29
- | `buttonClassName` | `string` | `undefined` | Additional CSS class name for the reload button |
30
- | `title` | `string` | `undefined` | Title text displayed (defaults to translated value via LocaleHoc) |
31
- | `description` | `string` | `undefined` | Description text displayed (defaults to translated value via LocaleHoc) |
32
- | `reloadText` | `string` | `undefined` | Text displayed on the reload button (defaults to translated value via LocaleHoc) |
33
- | `url` | `string` | `undefined` | URL to navigate to when reload button is clicked and pathname includes "somethingwentwrong" |
34
- | `onClickReload` | `() => void` | `undefined` | Custom reload handler function. If provided, this takes precedence over default reload behavior |
35
-
36
-
37
- ### CSS/Styling Changes
38
-
39
- 1. **SCSS Modules**: Replaced styled-components with SCSS modules
40
- 2. **Class Naming**: Maintained backward compatibility with class name `cap-something-went-wrong`
41
- 3. **Color Variables**: Button color uses SCSS variable value `$cap-secondary-base` (#2466ea)
42
-
43
- ### Migration Example
44
-
45
- No code changes required! The component API is fully backward compatible:
46
-
47
- **cap-ui-library (v8.x)**
48
- ```jsx
49
- import CapSomethingWentWrong from '@capillarytech/cap-ui-library/CapSomethingWentWrong';
50
-
51
- <CapSomethingWentWrong
52
- title="Sorry, something went wrong."
53
- description="Please try again."
54
- reloadText="Try refreshing again"
55
- url="/dashboard"
56
- />
57
- ```
58
-
59
- **blaze-ui**
60
- ```jsx
61
- import { CapSomethingWentWrong } from '@capillarytech/blaze-ui';
62
-
63
- <CapSomethingWentWrong
64
- title="Sorry, something went wrong."
65
- description="Please try again."
66
- reloadText="Try refreshing again"
67
- url="/dashboard"
68
- />
69
- ```
70
-
71
- ### Default Translations
72
-
73
- The component uses `LocaleHoc` to provide default translations. The following translation keys are used:
74
-
75
- - `blaze.components.SomethingWentWrong.title`: "Sorry, something went wrong."
76
- - `blaze.components.SomethingWentWrong.description`: "Please try again. If this issue occurs again, please reach out to Capillary support team."
77
- - `blaze.components.SomethingWentWrong.reloadText`: "Try refreshing again"
78
-
79
- ### Reload Behavior
80
-
81
- The component handles reload in the following order:
82
-
83
- 1. If `onClickReload` prop is provided, it will be called when the button is clicked
84
- 2. If `onClickReload` is not provided:
85
- - If the current pathname includes "somethingwentwrong", it navigates to the `url` prop (or empty string if not provided)
86
- - Otherwise, it reloads the current page using `window.location.reload()`
87
-
88
- ### Dependencies
89
-
90
- This component depends on the following blaze-ui components:
91
- - `CapHeading` (migrated)
92
- - `CapButton` (migrated)
93
- - `LocaleHoc` (migrated)
94
-
95
- ### Assets
96
-
97
- The component uses the `repair.png` image located at `components/assets/images/repair.png`.
@@ -1,19 +0,0 @@
1
- # CapSplit Component Migration (v3 → v6)
2
-
3
- ## Migration Status: ✅ COMPLETE
4
-
5
- **Migration Date:** 2026-01-23
6
- **Migrated By:** Automated Migration System
7
-
8
- ---
9
-
10
- ## Summary
11
-
12
- The `CapSplit` component has been successfully migrated from Ant Design v3 to v6. This component provides an interactive audience splitting interface with a slider-based UI for distributing percentages across multiple groups.
13
-
14
-
15
- ## Breaking Changes
16
-
17
- ### ❌ No Breaking Changes
18
-
19
- This component does **not** use any Ant Design components directly - it uses `rc-slider` library. Therefore, there are no API breaking changes from the Ant Design v3 → v6 migration.
@@ -1,138 +0,0 @@
1
- # CapStatisticCard
2
-
3
- A component for displaying statistics in a card layout with optional headers and dividers.
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 full backward compatibility with the previous version.
12
-
13
- ### Prop Changes
14
-
15
- | Prop | Status | Type | Description |
16
- |------|--------|------|-------------|
17
- | `statsItems` | ✅ Unchanged | `CapStatisticCardItem[]` | Array of statistic items to display |
18
- | `width` | ✅ Unchanged | `string` | Width for each statistic item (default: '20%') |
19
- | `type` | ✅ Unchanged | `string` | Optional type label displayed in the first column |
20
- | `showHeader` | ✅ Unchanged | `boolean` | Whether to show header row with item text labels |
21
-
22
- ### TypeScript Interfaces
23
-
24
- ```typescript
25
- export interface CapStatisticCardItem {
26
- text: string;
27
- value: string | number;
28
- subText?: string;
29
- }
30
-
31
- export interface CapStatisticCardProps {
32
- statsItems: CapStatisticCardItem[];
33
- width?: string;
34
- type?: string;
35
- showHeader?: boolean;
36
- }
37
- ```
38
-
39
- ### API Changes
40
-
41
- - **TypeScript Support:** Full TypeScript support with exported `CapStatisticCardProps` and `CapStatisticCardItem` interfaces
42
- - **Styling:** Migrated from global SCSS to SCSS modules for better encapsulation
43
- - **Spacing:** Converted inline spacing values to use SCSS variables from `blaze-ui/components/styled/variables.scss`
44
- - **Pixel Values:** Converted pixel values to rem units (base: 14px = 1rem)
45
-
46
- ### Behavioral Changes
47
-
48
- - **Class Names:** Now uses SCSS module class names (e.g., `styles['stats-card']`) instead of global class names
49
- - **Spacing Constants:** Uses SCSS variables (`$cap-space-04`, `$cap-space-08`, `$cap-space-12`) instead of JavaScript constants
50
- - **Pixel Conversion:** All pixel values converted to rem:
51
- - `10px` → `0.714rem`
52
- - `-4px` → `-0.286rem`
53
- - `12px` → `0.857rem` (via `$cap-space-12`)
54
-
55
- ### Usage Examples
56
-
57
- #### Basic Usage
58
-
59
- ```tsx
60
- import { CapStatisticCard } from '@capillarytech/blaze-ui';
61
-
62
- const stats = [
63
- { text: 'Total Users', value: 1234 },
64
- { text: 'Active Users', value: 856 },
65
- { text: 'Revenue', value: '$12,345', subText: '+12% from last month' },
66
- ];
67
-
68
- <CapStatisticCard statsItems={stats} />
69
- ```
70
-
71
- #### With Type Label
72
-
73
- ```tsx
74
- <CapStatisticCard
75
- statsItems={stats}
76
- type="Monthly Stats"
77
- showHeader
78
- />
79
- ```
80
-
81
- #### Custom Width
82
-
83
- ```tsx
84
- <CapStatisticCard
85
- statsItems={stats}
86
- width="25%"
87
- />
88
- ```
89
-
90
- #### With Subtext
91
-
92
- ```tsx
93
- const statsWithSubtext = [
94
- { text: 'Revenue', value: '$12,345', subText: '+12% from last month' },
95
- { text: 'Users', value: 1234, subText: '+5% growth' },
96
- ];
97
-
98
- <CapStatisticCard statsItems={statsWithSubtext} />
99
- ```
100
-
101
- ### Migration Steps for Consumers
102
-
103
- 1. **Update Import:**
104
- ```tsx
105
- // Before
106
- import CapStatisticCard from '@capillarytech/cap-ui-library/components/CapStatisticCard';
107
-
108
- // After
109
- import { CapStatisticCard } from '@capillarytech/blaze-ui';
110
- ```
111
-
112
- 2. **No prop changes required** - All props work exactly as before.
113
-
114
- 3. **TypeScript Support:** If using TypeScript, you can now import types:
115
- ```tsx
116
- import { CapStatisticCard, CapStatisticCardProps, CapStatisticCardItem } from '@capillarytech/blaze-ui';
117
- ```
118
-
119
- ### TypeScript
120
-
121
- ```tsx
122
- import { CapStatisticCard, CapStatisticCardProps, CapStatisticCardItem } from '@capillarytech/blaze-ui';
123
-
124
- const stats: CapStatisticCardItem[] = [
125
- { text: 'Total Users', value: 1234 },
126
- { text: 'Active Users', value: 856 },
127
- { text: 'Revenue', value: '$12,345', subText: '+12% from last month' },
128
- ];
129
-
130
- const props: CapStatisticCardProps = {
131
- statsItems: stats,
132
- type: 'Monthly Stats',
133
- showHeader: true,
134
- width: '20%',
135
- };
136
-
137
- <CapStatisticCard {...props} />
138
- ```
@@ -1,148 +0,0 @@
1
- # CapStatus
2
-
3
- A status indicator component that displays a colored dot with optional text label.
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 deprecated Ant Design props** - CapStatus does not directly use any Ant Design components, so there are no Ant Design component prop changes to document.
16
-
17
- #### Ant Design Component Usage
18
-
19
- CapStatus does not directly import or use any Ant Design components (such as Dropdown, Input, Alert, Tooltip, Tabs, etc.). The component only uses:
20
-
21
- - `CapRow` - A wrapper component that internally uses Ant Design's `Row` component
22
- - `CapLabel` - A wrapper component for text labels
23
-
24
- **Note:** While `CapRow` uses Ant Design's `Row` component internally, Ant Design's `Row` component does not have any deprecated props in v6. The Ant Design `Row` and `Col` components are not mentioned in the Ant Design v6 migration guide's deprecated API list.
25
-
26
- ### Prop Changes
27
-
28
- | Prop | Status | Notes |
29
- |------|--------|-------|
30
- | `type` | ✅ Unchanged | Status type: `'draft'` \| `'pending'` \| `'unsubmitted'` \| `'awaitingApproval'` \| `'approved'` \| `'rejected'` \| `''` |
31
- | `color` | ✅ Unchanged | Custom color override (string) |
32
- | `text` | ✅ Unchanged | Text label to display next to the status dot |
33
- | `height` | ✅ Unchanged | Height of the status dot (default: `CAP_SPACE_08`) |
34
- | `width` | ✅ Unchanged | Width of the status dot (default: `CAP_SPACE_08`) |
35
-
36
- ### API Changes
37
-
38
- - **TypeScript Support:** Full TypeScript support with exported `CapStatusProps` interface
39
- - **Ant Design Version:** N/A - Component does not directly use Ant Design components
40
- - **Styling:** Migrated from styled-components to SCSS modules
41
- - **Component Structure:** Migrated from class component to functional component
42
-
43
- ### Behavioral Changes
44
-
45
- - **Default Props:** Default values are now set via ES6 default parameters instead of `defaultProps`
46
- - **Styling:** Uses CSS custom properties (CSS variables) for dynamic styling instead of inline styles
47
- - **Type Safety:** Full TypeScript type definitions with `CapStatusType` union type
48
-
49
- ### Usage Examples
50
-
51
- #### Basic Usage
52
-
53
- ```tsx
54
- import { CapStatus } from '@capillarytech/blaze-ui';
55
-
56
- // Approved status
57
- <CapStatus type="approved" text="Approved" />
58
-
59
- // Pending status
60
- <CapStatus type="pending" text="Pending Review" />
61
-
62
- // Rejected status
63
- <CapStatus type="rejected" text="Rejected" />
64
- ```
65
-
66
- #### Custom Color
67
-
68
- ```tsx
69
- <CapStatus
70
- type=""
71
- color="#FF5733"
72
- text="Custom Status"
73
- />
74
- ```
75
-
76
- #### Custom Size
77
-
78
- ```tsx
79
- <CapStatus
80
- type="approved"
81
- text="Approved"
82
- width="12px"
83
- height="12px"
84
- />
85
- ```
86
-
87
- #### All Status Types
88
-
89
- ```tsx
90
- <CapStatus type="draft" text="Draft" />
91
- <CapStatus type="pending" text="Pending" />
92
- <CapStatus type="unsubmitted" text="Unsubmitted" />
93
- <CapStatus type="awaitingApproval" text="Awaiting Approval" />
94
- <CapStatus type="approved" text="Approved" />
95
- <CapStatus type="rejected" text="Rejected" />
96
- ```
97
-
98
- ### Migration Steps for Consumers
99
-
100
- 1. **No prop changes required** - All props work exactly as before
101
- 2. **Import path update:**
102
- ```tsx
103
- // Before
104
- import CapStatus from '@capillarytech/cap-ui-library/components/CapStatus';
105
-
106
- // After
107
- import { CapStatus } from '@capillarytech/blaze-ui';
108
- ```
109
-
110
- 3. **TypeScript support (if applicable):**
111
- ```tsx
112
- import { CapStatus } from '@capillarytech/blaze-ui';
113
- import type { CapStatusProps } from '@capillarytech/blaze-ui';
114
-
115
- const props: CapStatusProps = {
116
- type: 'approved',
117
- text: 'Approved',
118
- };
119
-
120
- <CapStatus {...props} />
121
- ```
122
-
123
- ### TypeScript
124
-
125
- ```tsx
126
- import { CapStatus } from '@capillarytech/blaze-ui';
127
- import type { CapStatusProps, CapStatusType } from '@capillarytech/blaze-ui';
128
-
129
- const props: CapStatusProps = {
130
- type: 'approved',
131
- text: 'Approved',
132
- height: '8px',
133
- width: '8px',
134
- };
135
-
136
- <CapStatus {...props} />
137
- ```
138
-
139
- ### Related Components
140
-
141
- - `CapRow` - Used internally for layout (wraps Ant Design `Row`)
142
- - `CapLabel` - Used internally for text display
143
-
144
- ### Notes
145
-
146
- - The component does not directly use Ant Design components, so there are no Ant Design v6 migration concerns
147
- - Color mapping follows Capillary design system tokens
148
- - The status dot uses CSS custom properties for dynamic styling