@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,254 +0,0 @@
1
- # CapCheckbox Component
2
-
3
- A checkbox component built on top of Ant Design v6 Checkbox with additional features like error messages, inductive text, and custom label types.
4
-
5
- ## Migration from cap-ui-library to blaze-ui
6
-
7
- ### Summary of Changes
8
-
9
- This component has been migrated from `cap-ui-library` to `blaze-ui` with the following improvements:
10
-
11
- 1. **TypeScript Conversion**
12
- - Converted from JavaScript to TypeScript
13
- - Added comprehensive TypeScript interfaces in separate `CapCheckbox.interfaces.ts` file
14
- - Replaced PropTypes with TypeScript types
15
- - Full type safety with no `any` types
16
-
17
- 2. **Modern React Patterns**
18
- - Maintained as functional component
19
- - Uses React hooks (already functional in cap-ui-library)
20
- - Better type safety with TypeScript
21
-
22
- 3. **Styling**
23
- - Converted from styled-components to SCSS modules
24
- - Uses SCSS variables from `components/styled/` directory
25
- - Maintains backward design compatibility with existing class names
26
-
27
- 4. **Ant Design v6 Migration**
28
- - Updated to use Ant Design v6 APIs (`antd-v5` package)
29
- - All Ant Design Checkbox props are supported through prop spreading
30
-
31
- ### Breaking Changes
32
-
33
- **No breaking changes from cap-ui-library v8.x**
34
-
35
- All props remain backward compatible. The component maintains the same API and behavior as the cap-ui-library version.
36
-
37
- ### Props
38
-
39
- | Prop Name | Type | Default | Description |
40
- |-----------|------|---------|-------------|
41
- | `className` | `string` | `undefined` | Additional CSS class name for the checkbox wrapper |
42
- | `children` | `React.ReactNode` | `undefined` | Label text/content for the checkbox |
43
- | `errorMessage` | `string` | `undefined` | Error message displayed below the checkbox when `className` contains "error" |
44
- | `inductiveText` | `string` | `undefined` | Additional text displayed below the checkbox label |
45
- | `suffix` | `React.ReactNode` | `undefined` | Additional content displayed after the label |
46
- | `labelType` | `string` | `'h4'` | Type of label to use (passed to `CapLabel.CapLabelInline`) |
47
- | `checked` | `boolean` | `undefined` | Whether the checkbox is checked (Ant Design prop) |
48
- | `disabled` | `boolean` | `undefined` | Whether the checkbox is disabled (Ant Design prop) |
49
- | `onChange` | `(e: CheckboxChangeEvent) => void` | `undefined` | Callback when checkbox state changes (Ant Design prop) |
50
- | `...rest` | `CheckboxProps` | - | All other Ant Design Checkbox props are supported |
51
-
52
- ### Deprecated Props
53
-
54
- **No deprecated props** - All props from cap-ui-library v8.x are still supported.
55
-
56
- The Checkbox component in Ant Design v6 does not have deprecated props that require backward compatibility mapping.
57
-
58
- ### TypeScript Interfaces
59
-
60
- ```typescript
61
- import type { CapCheckboxProps } from '@capillarytech/blaze-ui';
62
-
63
- interface CapCheckboxProps extends Omit<CheckboxProps, 'children'> {
64
- className?: string;
65
- children?: React.ReactNode;
66
- errorMessage?: string;
67
- inductiveText?: string;
68
- suffix?: React.ReactNode;
69
- labelType?: string;
70
- }
71
- ```
72
-
73
- ### Static Properties
74
-
75
- The component exposes `CapCheckbox.Group` for checkbox groups:
76
-
77
- ```tsx
78
- import { CapCheckbox } from '@capillarytech/blaze-ui';
79
-
80
- <CapCheckbox.Group>
81
- <CapCheckbox value="option1">Option 1</CapCheckbox>
82
- <CapCheckbox value="option2">Option 2</CapCheckbox>
83
- </CapCheckbox.Group>
84
- ```
85
-
86
- ### Behavioral Changes
87
-
88
- None. The component behaves identically to the original cap-ui-library implementation.
89
-
90
- ### Migration Steps
91
-
92
- #### 1. Update Import
93
-
94
- ```tsx
95
- // Before (cap-ui-library)
96
- import CapCheckbox from '@capillarytech/cap-ui-library/CapCheckbox';
97
-
98
- // After (blaze-ui)
99
- import { CapCheckbox } from '@capillarytech/blaze-ui';
100
- // or
101
- import CapCheckbox from '@capillarytech/blaze-ui/CapCheckbox';
102
- ```
103
-
104
- #### 2. Usage (No Changes Required)
105
-
106
- ```tsx
107
- // Basic usage - works exactly the same
108
- <CapCheckbox>Checkbox Label</CapCheckbox>
109
-
110
- // With error message
111
- <CapCheckbox className="error" errorMessage="This field is required">
112
- Required Field
113
- </CapCheckbox>
114
-
115
- // With inductive text
116
- <CapCheckbox inductiveText="Additional information">
117
- Checkbox with Info
118
- </CapCheckbox>
119
-
120
- // With suffix
121
- <CapCheckbox suffix={<span>★</span>}>Checkbox with Suffix</CapCheckbox>
122
-
123
- // Controlled checkbox
124
- <CapCheckbox checked={isChecked} onChange={handleChange}>
125
- Controlled Checkbox
126
- </CapCheckbox>
127
-
128
- // Disabled checkbox
129
- <CapCheckbox disabled>Disabled Checkbox</CapCheckbox>
130
- ```
131
-
132
- #### 3. TypeScript (New Benefit)
133
-
134
- If using TypeScript, you now get full type checking:
135
-
136
- ```tsx
137
- import { CapCheckbox, CapCheckboxProps } from '@capillarytech/blaze-ui';
138
-
139
- // Type-safe props
140
- const props: CapCheckboxProps = {
141
- labelType: 'h3',
142
- errorMessage: 'Error message',
143
- children: 'Checkbox Label'
144
- };
145
-
146
- <CapCheckbox {...props} />
147
- ```
148
-
149
- ### Examples
150
-
151
- #### Basic Usage
152
-
153
- ```tsx
154
- import { CapCheckbox } from '@capillarytech/blaze-ui';
155
-
156
- function Form() {
157
- const [checked, setChecked] = React.useState(false);
158
-
159
- return (
160
- <CapCheckbox checked={checked} onChange={(e) => setChecked(e.target.checked)}>
161
- I agree to the terms and conditions
162
- </CapCheckbox>
163
- );
164
- }
165
- ```
166
-
167
- #### With Error Message
168
-
169
- ```tsx
170
- import { CapCheckbox } from '@capillarytech/blaze-ui';
171
-
172
- function Form() {
173
- const [hasError, setHasError] = React.useState(true);
174
-
175
- return (
176
- <CapCheckbox
177
- className={hasError ? 'error' : ''}
178
- errorMessage="Please accept the terms to continue"
179
- >
180
- Accept Terms
181
- </CapCheckbox>
182
- );
183
- }
184
- ```
185
-
186
- #### With Inductive Text
187
-
188
- ```tsx
189
- import { CapCheckbox } from '@capillarytech/blaze-ui';
190
-
191
- function Form() {
192
- return (
193
- <CapCheckbox inductiveText="By checking this, you agree to receive marketing emails">
194
- Subscribe to newsletter
195
- </CapCheckbox>
196
- );
197
- }
198
- ```
199
-
200
- #### Checkbox Group
201
-
202
- ```tsx
203
- import { CapCheckbox } from '@capillarytech/blaze-ui';
204
-
205
- function Form() {
206
- const [selectedValues, setSelectedValues] = React.useState<string[]>([]);
207
-
208
- return (
209
- <CapCheckbox.Group
210
- value={selectedValues}
211
- onChange={(values) => setSelectedValues(values as string[])}
212
- >
213
- <CapCheckbox value="option1">Option 1</CapCheckbox>
214
- <CapCheckbox value="option2">Option 2</CapCheckbox>
215
- <CapCheckbox value="option3">Option 3</CapCheckbox>
216
- </CapCheckbox.Group>
217
- );
218
- }
219
- ```
220
-
221
- #### Custom Label Type
222
-
223
- ```tsx
224
- import { CapCheckbox } from '@capillarytech/blaze-ui';
225
-
226
- function Form() {
227
- return (
228
- <CapCheckbox labelType="h3">
229
- Large Label Checkbox
230
- </CapCheckbox>
231
- );
232
- }
233
- ```
234
-
235
- ### Styling
236
-
237
- The component uses SCSS modules with the following class structure:
238
-
239
- - `.cap-checkbox-wrapper` - Main wrapper
240
- - `.cap-checkbox-v2` - Checkbox container
241
- - `.title` - Label styling
242
- - `.title.has-suffix` - Label with suffix spacing
243
- - `.inductive-text` - Inductive text styling
244
- - `.error-message` - Error message styling
245
-
246
- All styles use SCSS variables from `components/styled/variables` for consistency.
247
-
248
- ### Notes
249
-
250
- - The component wraps Ant Design's Checkbox component and extends it with additional features
251
- - Error messages are only displayed when `className` contains the string "error" and `errorMessage` is provided
252
- - The `labelType` prop is passed directly to `CapLabel.CapLabelInline` component
253
- - All Ant Design Checkbox props are supported through prop spreading
254
- - The component maintains backward compatibility with existing designs and class names
@@ -1,41 +0,0 @@
1
- # Migration Status: CapCheckbox
2
-
3
- **Last Updated**: 2026-01-19 02:40:52
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**: Linting (ESLint)
12
- - [x] **Step 5**: Pre-build Validation
13
- - [x] **Step 6**: Build blaze-ui
14
- - [x] **Step 7**: Visual Testing
15
- - [x] **Step 8**: CSS Analysis (if mismatches found)
16
- - [x] **Step 8.5**: CSS Analysis Completed
17
- - [x] **Step 8.9**: Run Tests & Fix Failures
18
- - [ ] **Step 9**: Git Commit & Push to branch
19
- - [ ] **Step 10**: Create Pull Request
20
-
21
- ## Visual Testing Results
22
-
23
- **Last Test**: 2026-01-19 02:40:52
24
- **Maximum Mismatch**: 2.48%
25
-
26
- ### Mismatched Variants:
27
- - ✅ All variants match perfectly!
28
-
29
-
30
- ## CSS Fixes Applied
31
-
32
- **Date**: 2026-01-19 02:40:52
33
- **Summary**: CSS fixes applied based on visual testing analysis.
34
-
35
- _See full analysis in: `/Users/sarahkhader/repos/migration/blaze-ui/tools/visual-testing/report/CapCheckbox/css-fix-analysis.md`_
36
-
37
-
38
- ## Notes
39
-
40
- _No notes yet._
41
-
@@ -1,112 +0,0 @@
1
- # CapColorPicker Component
2
-
3
- A React component for selecting colors using a color picker interface.
4
-
5
- ## Migration from cap-ui-library to blaze-ui
6
-
7
- ### Summary of Changes
8
-
9
- This component has been migrated from JavaScript to TypeScript with the following improvements:
10
-
11
- 1. **TypeScript Conversion**
12
- - Converted from JavaScript to TypeScript
13
- - Added comprehensive TypeScript interfaces in `types.ts`
14
- - Replaced PropTypes with TypeScript types
15
- - Removed PropTypes dependency
16
-
17
- 2. **Modern React Patterns**
18
- - Converted from class component to functional component
19
- - Uses React.FC for type safety
20
- - Better type safety with TypeScript
21
-
22
- 3. **Styling**
23
- - Maintained SCSS structure
24
- - Updated border-radius to use rem units for consistency
25
- - Uses SCSS variables from `components/styles/_variables.scss`
26
-
27
- ### Breaking Changes
28
-
29
- **No breaking changes from cap-ui-library v8.x**
30
-
31
- All props remain backward compatible. The component maintains the same API and behavior as the cap-ui-library version.
32
-
33
- ### Deprecated Props
34
-
35
- **No deprecated Ant Design props**
36
-
37
- This component does not use any Ant Design components. It uses `react-colorful`'s `HexColorPicker` component for color picking functionality. Therefore, there are no Ant Design component prop changes or deprecated props to document.
38
-
39
- **Verification:**
40
- - ✅ No Ant Design components imported (`antd`, `@ant-design/icons`, etc.)
41
- - ✅ Component uses only `react-colorful` library
42
- - ✅ No Ant Design props or APIs used
43
- - ✅ No migration from deprecated Ant Design APIs required
44
-
45
- ### Props
46
-
47
- | Prop Name | Type | Default | Description |
48
- |-----------|------|---------|-------------|
49
- | `className` | `string` | `''` | Additional CSS class name |
50
- | `color` | `string` | `'#d42020'` | Current color value (hex format) |
51
- | `setColor` | `(color: string) => void` | `() => {}` | Callback function when color changes |
52
- | `hexSelector` | `boolean` | `false` | Whether to show hex selector |
53
-
54
- ### Behavioral Changes
55
-
56
- - Component is now a functional component instead of a class component
57
- - TypeScript provides better type safety and IntelliSense support
58
- - Border radius uses rem units for consistency with design system
59
-
60
- ### Usage
61
-
62
- #### Basic Usage
63
-
64
- ```tsx
65
- import { CapColorPicker } from '@capillarytech/blaze-ui';
66
- import { useState } from 'react';
67
-
68
- const MyComponent = () => {
69
- const [color, setColor] = useState('#d42020');
70
-
71
- return (
72
- <CapColorPicker color={color} setColor={setColor} />
73
- );
74
- };
75
- ```
76
-
77
- #### With Hex Selector
78
-
79
- ```tsx
80
- <CapColorPicker
81
- color={color}
82
- setColor={setColor}
83
- hexSelector={true}
84
- />
85
- ```
86
-
87
- #### With Custom Class Name
88
-
89
- ```tsx
90
- <CapColorPicker
91
- color={color}
92
- setColor={setColor}
93
- className="my-custom-picker"
94
- />
95
- ```
96
-
97
- ### Notes
98
-
99
- - The component uses `react-colorful` library for color picking functionality
100
- - When `hexSelector` is `false`, the component uses the `cap-slider-v2` class
101
- - When `hexSelector` is `true`, the component uses the `cap-hexslider-v2` class
102
- - The saturation control is hidden by default via CSS
103
-
104
- ### Import Examples
105
-
106
- ```tsx
107
- // Named import (recommended)
108
- import { CapColorPicker } from '@capillarytech/blaze-ui';
109
-
110
- // Type import
111
- import type { CapColorPickerProps } from '@capillarytech/blaze-ui';
112
- ```
@@ -1,52 +0,0 @@
1
- # Migration Status: CapColorPicker
2
-
3
- **Last Updated**: 2026-02-04 02:03:49
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 9**: CSS Analysis (if mismatches found)
19
- - [x] **Step 9.5**: CSS Analysis Completed
20
- - [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
21
- - [x] **Step 11**: Create Pull Request
22
-
23
- ## Deprecated Props Verification
24
-
25
- _No deprecated props verification results yet._
26
-
27
- **Note**: Step 2.5 is REQUIRED and enforced.
28
- - Focus: **Ant Design component prop changes** (e.g., Dropdown, Input, Alert, Tooltip, etc.)
29
- - Reference: MIGRATION_CHANGELOG_TEMPLATE.md for format, ANTD_V6_MIGRATION.md for Ant Design deprecated APIs
30
- - Skip: If original component doesn't exist in cap-ui-library
31
- - All deprecated Ant Design props and prop changes must be documented before proceeding.
32
-
33
- ## Visual Testing Results
34
-
35
- **Last Test**: 2026-02-04 02:03:49
36
- **Maximum Mismatch**: 0%
37
-
38
- ### Mismatched Variants:
39
- -
40
-
41
-
42
- ## CSS Fixes Applied
43
-
44
- **Date**: 2026-01-31 17:05:14
45
- **Summary**: CSS fixes applied based on visual testing analysis.
46
-
47
- _See full analysis in: `/Users/sarahkhader/repos/migration/blaze-ui/tools/visual-testing/report/CapColorPicker/css-fix-analysis.md`_
48
-
49
-
50
- ## Notes
51
-
52
- _No notes yet._
@@ -1,92 +0,0 @@
1
- # CapColorPicker Use Cases Analysis
2
-
3
- ## Phase 0: Use Cases Extraction
4
-
5
- **Status**: ⚠️ **Unable to access Google Sheets MCP server**
6
-
7
- The Google Sheets MCP server (`google_sheets`) was not available during test creation. Use cases were inferred from component analysis and standard color picker requirements.
8
-
9
- ## Phase 1: Use Cases NOT Fulfilled by Component
10
-
11
- Based on analysis of `CapColorPicker` component code, the following use cases are **NOT currently supported**:
12
-
13
- ### 1. **Preset Color Palette**
14
- - ❌ No predefined color swatches
15
- - ❌ No recent colors history
16
- - ❌ No favorite colors functionality
17
-
18
- ### 2. **Multiple Color Format Support**
19
- - ❌ Only supports hex format (`#RRGGBB`)
20
- - ❌ No RGB input fields
21
- - ❌ No HSL input fields
22
- - ❌ No conversion between formats
23
-
24
- ### 3. **Input Validation**
25
- - ❌ No validation for invalid hex colors
26
- - ❌ No error messages for invalid input
27
- - ❌ No format enforcement
28
-
29
- ### 4. **Component States**
30
- - ❌ No disabled state
31
- - ❌ No loading state
32
- - ❌ No error state
33
- - ❌ No readonly state
34
-
35
- ### 5. **Size Variants**
36
- - ❌ No size prop (small, medium, large)
37
- - ❌ Fixed size only
38
-
39
- ### 6. **Advanced Features**
40
- - ❌ No alpha/opacity channel support
41
- - ❌ No color picker presets
42
- - ❌ No color picker themes
43
- - ❌ No keyboard shortcuts documentation
44
-
45
- ### 7. **Accessibility Enhancements**
46
- - ❌ No aria-label prop (relies on underlying library)
47
- - ❌ No aria-describedby for helper text
48
- - ❌ No focus management documentation
49
- - ⚠️ Limited keyboard navigation (depends on react-colorful)
50
-
51
- ### 8. **Event Handling**
52
- - ❌ Only onChange callback (setColor)
53
- - ❌ No onComplete/onBlur callback
54
- - ❌ No onFocus callback
55
- - ❌ No onChangeStart/onChangeEnd callbacks
56
-
57
- ### 9. **UI Enhancements**
58
- - ❌ No label prop
59
- - ❌ No helper text
60
- - ❌ No error message display
61
- - ❌ No placeholder/initial value distinction
62
-
63
- ### 10. **Integration Features**
64
- - ❌ No form integration helpers (Form.Item wrapper)
65
- - ❌ No validation integration
66
- - ❌ No controlled/uncontrolled mode distinction
67
-
68
- ## Current Component Capabilities
69
-
70
- ✅ **Supported Features**:
71
- - Basic hex color selection via visual picker
72
- - Custom className support
73
- - Hex selector toggle (visual difference via CSS class)
74
- - Color change callback (setColor)
75
- - Default color value
76
- - CSS class customization
77
-
78
- ## Recommendations
79
-
80
- If the Google Sheets contains use cases requiring any of the above features, the component would need enhancements to support them. The current implementation is a minimal wrapper around `react-colorful`'s `HexColorPicker`.
81
-
82
- ## Test Coverage
83
-
84
- Comprehensive tests have been created covering:
85
- - ✅ Default rendering and initialization
86
- - ✅ Prop variations (color, className, hexSelector)
87
- - ✅ User interactions (click, mouse move)
88
- - ✅ Callbacks (setColor)
89
- - ✅ Edge cases (empty, invalid colors)
90
- - ✅ Accessibility (role, aria-label, tabIndex)
91
- - ✅ Data flow and state management
92
- - ✅ Conditional rendering logic