@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.
- package/CapAskAira/CapAiMediaGeneration/saga.js +1446 -0
- package/CapAskAira/CapAiMediaGeneration/saga.js.map +1 -0
- package/CapCollapsibleLeftNavigation/saga.js +1441 -0
- package/CapCollapsibleLeftNavigation/saga.js.map +1 -0
- package/CapLanguageProvider/actions.js +125 -0
- package/CapLanguageProvider/actions.js.map +1 -0
- package/CapLanguageProvider/constants.js +37 -0
- package/CapLanguageProvider/constants.js.map +1 -0
- package/CapLanguageProvider/reducer.js +130 -0
- package/CapLanguageProvider/reducer.js.map +1 -0
- package/CapLanguageProvider/saga.js +1457 -0
- package/CapLanguageProvider/saga.js.map +1 -0
- package/CapLanguageProvider/selector.js +186 -0
- package/CapLanguageProvider/selector.js.map +1 -0
- package/CapSupportVideosWrapper/utils.js +34 -0
- package/CapSupportVideosWrapper/utils.js.map +1 -0
- package/package.json +1 -1
- package/CapActionBar/README.md +0 -11
- package/CapAdvancedIcon/README.md +0 -185
- package/CapAdvancedIcon/use-cases.md +0 -44
- package/CapAlert/README.md +0 -144
- package/CapAppNotEnabled/README.md +0 -84
- package/CapAskAira/README.md +0 -328
- package/CapBanner/README.md +0 -4
- package/CapBlock/README.md +0 -175
- package/CapBorderedBox/Status.md +0 -40
- package/CapCSVFileUploader/README.md +0 -124
- package/CapCSVFileUploader/Status.md +0 -47
- package/CapCard/README.md +0 -85
- package/CapCard/Status.md +0 -41
- package/CapCardBox/README.md +0 -169
- package/CapCardBox/Status.md +0 -52
- package/CapCarousel/README.md +0 -190
- package/CapCarousel/Status.md +0 -73
- package/CapCheckbox/README.md +0 -254
- package/CapCheckbox/Status.md +0 -41
- package/CapColorPicker/README.md +0 -112
- package/CapColorPicker/Status.md +0 -52
- package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
- package/CapColoredTag/README.md +0 -167
- package/CapColoredTag/Status.md +0 -49
- package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
- package/CapConditionPreview/README.md +0 -40
- package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
- package/CapCustomCard/README.md +0 -182
- package/CapCustomCard/Status.md +0 -40
- package/CapCustomCarousel/Status.md +0 -69
- package/CapCustomCheckboxList/README.md +0 -178
- package/CapCustomCheckboxList/Status.md +0 -52
- package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
- package/CapCustomList/README.md +0 -117
- package/CapCustomList/Status.md +0 -77
- package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
- package/CapCustomSelect/README.md +0 -38
- package/CapDatePicker/README.md +0 -139
- package/CapDateRangePicker/README.md +0 -159
- package/CapDateTimePicker/README.md +0 -136
- package/CapDateTimeRangePicker/README.md +0 -243
- package/CapDivider/README.md +0 -122
- package/CapDrawer/README.md +0 -207
- package/CapDrawer/Status.md +0 -52
- package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
- package/CapDropdown/README.md +0 -515
- package/CapDropdown/Status.md +0 -45
- package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
- package/CapError/README.md +0 -88
- package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
- package/CapErrorBoundary/README.md +0 -150
- package/CapErrorStateIllustration/README.md +0 -222
- package/CapErrorStateIllustration/USE_CASES.md +0 -33
- package/CapExpressionEditor/README.md +0 -32
- package/CapForm/README.md +0 -132
- package/CapForm/Status.md +0 -40
- package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
- package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
- package/CapFormItem/README.md +0 -320
- package/CapFormItem/Status.md +0 -73
- package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
- package/CapGraph/README.md +0 -69
- package/CapGraph/USE_CASES.md +0 -66
- package/CapHamburgerMenu/README.md +0 -234
- package/CapHamburgerMenu/USE_CASES.md +0 -48
- package/CapHeader/Status.md +0 -41
- package/CapHeading/README.md +0 -220
- package/CapHeading/Status.md +0 -41
- package/CapIcon/README.md +0 -207
- package/CapIllustration/Status.md +0 -41
- package/CapImage/README.md +0 -50
- package/CapImportMFEComponent/README.md +0 -121
- package/CapInfoNote/Status.md +0 -40
- package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
- package/CapInput/README.md +0 -196
- package/CapInput/Status.md +0 -123
- package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
- package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
- package/CapLanguageProvider/README.md +0 -206
- package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
- package/CapLevelGraphRenderer/README.md +0 -123
- package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
- package/CapLink/README.md +0 -203
- package/CapLink/Status.md +0 -32
- package/CapLink/tests/CapLink.missingUseCases.md +0 -95
- package/CapList/README.md +0 -129
- package/CapList/Status.md +0 -69
- package/CapListLayout/README.md +0 -7
- package/CapLogin/README.md +0 -7
- package/CapMenu/README.md +0 -86
- package/CapModal/README.md +0 -357
- package/CapModal/Status.md +0 -52
- package/CapModal/tests/USE_CASES_GAPS.md +0 -207
- package/CapMultiSelect/README.md +0 -170
- package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
- package/CapMultiSelectDatePicker/README.md +0 -11
- package/CapNavigation/README.md +0 -72
- package/CapNotification/README.md +0 -228
- package/CapNotificationDropdown/README.md +0 -5
- package/CapPopover/README.md +0 -234
- package/CapProgress/Status.md +0 -40
- package/CapRadio/Status.md +0 -54
- package/CapRadioButton/README.md +0 -152
- package/CapRadioButton/Status.md +0 -70
- package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapRadioCard/README.md +0 -161
- package/CapRadioCard/Status.md +0 -78
- package/CapRadioGroup/README.md +0 -141
- package/CapRadioGroup/Status.md +0 -59
- package/CapReorderComponent/README.md +0 -179
- package/CapReorderComponent/Status.md +0 -41
- package/CapRoadMap/README.md +0 -126
- package/CapRoadMap/Status.md +0 -53
- package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
- package/CapRow/README.md +0 -424
- package/CapSKUUploader/README.md +0 -189
- package/CapSKUUploader/Status.md +0 -66
- package/CapSecondaryTopBar/README.md +0 -7
- package/CapSelect/README.md +0 -243
- package/CapSelectFilter/README.md +0 -121
- package/CapShape/README.md +0 -96
- package/CapShape/Status.md +0 -36
- package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapSideBar/README.md +0 -298
- package/CapSideBar/Status.md +0 -5
- package/CapSlideBox/README.md +0 -68
- package/CapSlider/README.md +0 -423
- package/CapSlider/Status.md +0 -48
- package/CapSlider/tests/TEST_COVERAGE.md +0 -118
- package/CapSnackBar/README.md +0 -222
- package/CapSnackBar/Status.md +0 -41
- package/CapSomethingWentWrong/README.md +0 -97
- package/CapSplit/README.md +0 -19
- package/CapStatisticCard/README.md +0 -138
- package/CapStatus/README.md +0 -148
- package/CapStatus/Status.md +0 -40
- package/CapSteps/Status.md +0 -40
- package/CapStepsAccordian/README.md +0 -305
- package/CapStepsAccordian/Status.md +0 -48
- package/CapSupportVideosWrapper/README.md +0 -14
- package/CapSwitch/README.md +0 -351
- package/CapTab/README.md +0 -406
- package/CapTab/Status.md +0 -104
- package/CapTab/tests/USE_CASE_GAPS.md +0 -143
- package/CapTabV3/ANALYSIS.md +0 -60
- package/CapTabV3/README.md +0 -156
- package/CapTabV3/Status.md +0 -52
- package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
- package/CapTable/README.md +0 -160
- package/CapTable/Status.md +0 -41
- package/CapTag/README.md +0 -16
- package/CapTagDropdown/README.md +0 -171
- package/CapTagDropdown/Status.md +0 -55
- package/CapTimePicker/README.md +0 -170
- package/CapTooltip/README.md +0 -336
- package/CapTooltipWithInfo/Status.md +0 -75
- package/CapTopBar/README.md +0 -146
- package/CapTree/README.md +0 -124
- package/CapTree/Status.md +0 -48
- package/CapTree/tests/STATUS.md +0 -154
- package/CapTreeSelect/README.md +0 -217
- package/CapTreeSelect/Status.md +0 -52
- package/CapTruncateList/README.md +0 -13
- package/CapUnifiedSelect/README.md +0 -40
- package/CapUploader/README.md +0 -313
- package/CapUploader/Status.md +0 -76
- package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
- package/CapUserProfile/README.md +0 -105
- package/CapUserProfile/Status.md +0 -95
- package/CapVirtualList/README.md +0 -162
- package/CapVirtualList/Status.md +0 -71
- package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
package/CapIcon/README.md
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
# CapIcon
|
|
2
|
-
|
|
3
|
-
Icon component that supports Ant Design icons, SVG icons, and custom components with various sizes and states.
|
|
4
|
-
|
|
5
|
-
## Migration from cap-ui-library
|
|
6
|
-
|
|
7
|
-
### Summary of Changes
|
|
8
|
-
|
|
9
|
-
The CapIcon component has been migrated from cap-ui-library to blaze-ui with the following updates:
|
|
10
|
-
|
|
11
|
-
- **TypeScript Migration**: Converted from JavaScript to TypeScript with proper type definitions
|
|
12
|
-
- **Ant Design v6 Compatibility**: Updated to use `@ant-design-v5/icons` instead of Ant Design v3's `<Icon>` component
|
|
13
|
-
- **SCSS Modules**: Converted from styled-components to SCSS modules
|
|
14
|
-
- **Functional Component**: Converted from class component to functional component with React hooks
|
|
15
|
-
- **Enhanced Features**: Added support for `color`, `spin`, `rotate`, and `component` props
|
|
16
|
-
|
|
17
|
-
### Props
|
|
18
|
-
|
|
19
|
-
| Prop | Type | Default | Description |
|
|
20
|
-
|------|------|---------|-------------|
|
|
21
|
-
| `type` | `string` | - | Icon type (Ant Design icon name or SVG icon name) |
|
|
22
|
-
| `size` | `'xs' \| 's' \| 'm' \| 'l'` | `'m'` | Icon size |
|
|
23
|
-
| `style` | `React.CSSProperties` | `{}` | Custom inline styles |
|
|
24
|
-
| `className` | `string` | `''` | Custom CSS class name |
|
|
25
|
-
| `disabled` | `boolean` | `false` | Whether the icon is disabled |
|
|
26
|
-
| `spin` | `boolean` | `false` | Whether the icon should spin (animation) |
|
|
27
|
-
| `rotate` | `number` | - | Rotation angle in degrees |
|
|
28
|
-
| `withBackground` | `boolean` | `false` | Whether to show circular background |
|
|
29
|
-
| `backgroundProps` | `React.HTMLAttributes<HTMLSpanElement>` | `{}` | Props for background wrapper |
|
|
30
|
-
| `onClick` | `(e: React.MouseEvent<HTMLSpanElement>) => void` | - | Click handler |
|
|
31
|
-
| `textLabel` | `React.ReactNode` | - | Text label to display alongside icon |
|
|
32
|
-
| `component` | `React.ReactNode` | - | Custom component to render instead of icon |
|
|
33
|
-
| `svgProps` | `Record<string, unknown>` | `{}` | Props to pass to SVG icon component |
|
|
34
|
-
| `allowSvg` | `boolean` | `true` | Whether to allow SVG icons |
|
|
35
|
-
| `color` | `string` | - | Icon color |
|
|
36
|
-
| `percent` | `number` | - | Percentage value for SVG icons (used by some SVG components) |
|
|
37
|
-
|
|
38
|
-
### Breaking Changes
|
|
39
|
-
|
|
40
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
41
|
-
|
|
42
|
-
All props from the original component are supported. The component maintains backward compatibility with existing usage patterns.
|
|
43
|
-
|
|
44
|
-
### API Changes
|
|
45
|
-
|
|
46
|
-
#### Icon Rendering Priority
|
|
47
|
-
|
|
48
|
-
The component follows this priority order for rendering icons:
|
|
49
|
-
|
|
50
|
-
1. **Custom Component**: If `component` prop is provided, it renders the custom component
|
|
51
|
-
2. **SVG Icon**: If `allowSvg` is `true` and a matching SVG icon is found, it renders the SVG icon
|
|
52
|
-
3. **Ant Design Icon**: If a matching Ant Design icon is found, it renders the Ant Design icon
|
|
53
|
-
4. **Fallback**: Renders an empty icon container
|
|
54
|
-
|
|
55
|
-
#### Subcomponents
|
|
56
|
-
|
|
57
|
-
##### CapIcon.AntIcon
|
|
58
|
-
|
|
59
|
-
A subcomponent for rendering Ant Design icons directly:
|
|
60
|
-
|
|
61
|
-
```tsx
|
|
62
|
-
<CapIcon.AntIcon className="custom-class" />
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
##### CapIcon.CapIconAvatar
|
|
66
|
-
|
|
67
|
-
A subcomponent for rendering an icon with a logo background and text label:
|
|
68
|
-
|
|
69
|
-
```tsx
|
|
70
|
-
<CapIcon.CapIconAvatar
|
|
71
|
-
text="AB"
|
|
72
|
-
width={32}
|
|
73
|
-
height={32}
|
|
74
|
-
backgroundProps={{ fill: '#ff0000' }}
|
|
75
|
-
labelProps={{ className: 'custom-label' }}
|
|
76
|
-
/>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**CapIconAvatar Props:**
|
|
80
|
-
|
|
81
|
-
| Prop | Type | Default | Description |
|
|
82
|
-
|------|------|---------|-------------|
|
|
83
|
-
| `className` | `string` | - | Custom CSS class name |
|
|
84
|
-
| `text` | `string` | - | Text to display in the avatar |
|
|
85
|
-
| `width` | `string \| number` | - | Width of the logo background |
|
|
86
|
-
| `height` | `string \| number` | - | Height of the logo background |
|
|
87
|
-
| `backgroundProps` | `React.HTMLAttributes<SVGElement>` | `{}` | Props for the logo background SVG |
|
|
88
|
-
| `labelProps` | `React.HTMLAttributes<HTMLSpanElement>` | `{}` | Props for the text label |
|
|
89
|
-
|
|
90
|
-
### Usage Examples
|
|
91
|
-
|
|
92
|
-
#### Basic Icon
|
|
93
|
-
|
|
94
|
-
```tsx
|
|
95
|
-
import CapIcon from '@capillarytech/blaze-ui/components/CapIcon';
|
|
96
|
-
|
|
97
|
-
<CapIcon type="user" />
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
#### Different Sizes
|
|
101
|
-
|
|
102
|
-
```tsx
|
|
103
|
-
<CapIcon type="user" size="xs" />
|
|
104
|
-
<CapIcon type="user" size="s" />
|
|
105
|
-
<CapIcon type="user" size="m" />
|
|
106
|
-
<CapIcon type="user" size="l" />
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
#### Icon States
|
|
110
|
-
|
|
111
|
-
```tsx
|
|
112
|
-
<CapIcon type="heart" disabled />
|
|
113
|
-
<CapIcon type="loading" spin />
|
|
114
|
-
<CapIcon type="arrow-right" rotate={45} />
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
#### With Background
|
|
118
|
-
|
|
119
|
-
```tsx
|
|
120
|
-
<CapIcon type="user" withBackground />
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
#### With Text Label
|
|
124
|
-
|
|
125
|
-
```tsx
|
|
126
|
-
<CapIcon type="user" textLabel="Profile" />
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
#### Custom Color
|
|
130
|
-
|
|
131
|
-
```tsx
|
|
132
|
-
<CapIcon type="heart" color="#ff0000" />
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
#### Interactive Icon
|
|
136
|
-
|
|
137
|
-
```tsx
|
|
138
|
-
<CapIcon
|
|
139
|
-
type="heart"
|
|
140
|
-
onClick={() => console.log('Clicked!')}
|
|
141
|
-
style={{ cursor: 'pointer' }}
|
|
142
|
-
/>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
#### Custom Component
|
|
146
|
-
|
|
147
|
-
```tsx
|
|
148
|
-
<CapIcon component={<span>★</span>} />
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
#### SVG Icon with Percent
|
|
152
|
-
|
|
153
|
-
```tsx
|
|
154
|
-
<CapIcon type="progress" percent={75} />
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
#### CapIconAvatar
|
|
158
|
-
|
|
159
|
-
```tsx
|
|
160
|
-
<CapIcon.CapIconAvatar
|
|
161
|
-
text="AB"
|
|
162
|
-
width={32}
|
|
163
|
-
height={32}
|
|
164
|
-
/>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Behavioral Changes
|
|
168
|
-
|
|
169
|
-
1. **Icon Name Mapping**: The component includes special mappings for common icon names (e.g., `add` → `plus`)
|
|
170
|
-
2. **Icon Name Conversion**: Icon names are automatically converted from kebab-case to PascalCase for Ant Design icon lookup
|
|
171
|
-
3. **Multiple Icon Variants**: The component tries multiple Ant Design icon variants (Outlined, Filled, TwoTone) when looking up icons
|
|
172
|
-
4. **SVG Icon Support**: SVG icons are prioritized over Ant Design icons when `allowSvg` is `true` and a matching SVG icon exists
|
|
173
|
-
|
|
174
|
-
### Migration Steps for Consumers
|
|
175
|
-
|
|
176
|
-
No migration steps required. The component maintains full backward compatibility with cap-ui-library v8.x.
|
|
177
|
-
|
|
178
|
-
If you want to take advantage of new features:
|
|
179
|
-
|
|
180
|
-
1. **Use TypeScript types**: Import `CapIconProps` for type safety
|
|
181
|
-
2. **Use new props**: Take advantage of `color`, `spin`, `rotate`, and `component` props
|
|
182
|
-
3. **Use subcomponents**: Use `CapIcon.AntIcon` and `CapIcon.CapIconAvatar` for specific use cases
|
|
183
|
-
|
|
184
|
-
### Code Examples
|
|
185
|
-
|
|
186
|
-
#### Before (cap-ui-library)
|
|
187
|
-
|
|
188
|
-
```jsx
|
|
189
|
-
import CapIcon from '@capillarytech/cap-ui-library/components/CapIcon';
|
|
190
|
-
|
|
191
|
-
<CapIcon type="user" />
|
|
192
|
-
<CapIcon type="user" withBackground />
|
|
193
|
-
<CapIcon.CapIconAvatar text="AB" />
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
#### After (blaze-ui)
|
|
197
|
-
|
|
198
|
-
```tsx
|
|
199
|
-
import CapIcon from '@capillarytech/blaze-ui/components/CapIcon';
|
|
200
|
-
|
|
201
|
-
<CapIcon type="user" />
|
|
202
|
-
<CapIcon type="user" withBackground />
|
|
203
|
-
<CapIcon.CapIconAvatar text="AB" />
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
The API remains the same, so no code changes are required for basic usage.
|
|
207
|
-
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapIllustration
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-01-31 18:52:06
|
|
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-01-31 18:52:06
|
|
25
|
-
**Maximum Mismatch**: 4.13%
|
|
26
|
-
|
|
27
|
-
### Mismatched Variants:
|
|
28
|
-
- no-access (with 3 interactions):4.13%
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## CSS Fixes Applied
|
|
32
|
-
|
|
33
|
-
**Date**: 2026-01-29 09:27:05
|
|
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/CapIllustration/css-fix-analysis.md`_
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## Notes
|
|
40
|
-
|
|
41
|
-
_No notes yet._
|
package/CapImage/README.md
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# CapImage Component
|
|
2
|
-
|
|
3
|
-
A simple image component with conditional rendering support.
|
|
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
|
|
14
|
-
- Replaced PropTypes with TypeScript types
|
|
15
|
-
|
|
16
|
-
2. **Modern React Patterns**
|
|
17
|
-
- Maintained as functional component (already was functional in cap-ui-library)
|
|
18
|
-
- Better type safety with TypeScript
|
|
19
|
-
- Cleaner code structure
|
|
20
|
-
|
|
21
|
-
3. **Styling**
|
|
22
|
-
- Converted to SCSS modules
|
|
23
|
-
- Uses `classNames` library for conditional class handling
|
|
24
|
-
- Removed Fragment wrapper (not needed for single element return)
|
|
25
|
-
|
|
26
|
-
### Breaking Changes
|
|
27
|
-
|
|
28
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
29
|
-
|
|
30
|
-
All props remain backward compatible. The component maintains the same API and behavior as the cap-ui-library version.
|
|
31
|
-
|
|
32
|
-
### Props
|
|
33
|
-
|
|
34
|
-
| Prop Name | Type | Default | Description |
|
|
35
|
-
|-----------|------|---------|-------------|
|
|
36
|
-
| `className` | `string` | `undefined` | Additional CSS class name for the image |
|
|
37
|
-
| `src` | `string` | `undefined` | Source URL of the image (required for rendering) |
|
|
38
|
-
| `alt` | `string` | `undefined` | Alternative text for the image |
|
|
39
|
-
| `...rest` | `ImgHTMLAttributes` | - | All standard HTML img element attributes |
|
|
40
|
-
|
|
41
|
-
### Behavioral Changes
|
|
42
|
-
|
|
43
|
-
- The component returns `null` instead of an empty `Fragment` when `src` is not provided (no visual change)
|
|
44
|
-
- All standard HTML image attributes are supported through spread props
|
|
45
|
-
|
|
46
|
-
### Notes
|
|
47
|
-
|
|
48
|
-
- The component only renders when a valid `src` prop is provided
|
|
49
|
-
- All standard HTML image attributes are supported (width, height, loading, onLoad, onError, etc.)
|
|
50
|
-
- The component uses SCSS modules for styling to avoid style conflicts
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# CapImportMFEComponent
|
|
2
|
-
|
|
3
|
-
A React component for dynamically importing and rendering remote components using Module Federation (MFE). This component requires Webpack 5 and Module Federation support.
|
|
4
|
-
|
|
5
|
-
## Migration from cap-ui-library to blaze-ui
|
|
6
|
-
|
|
7
|
-
### Summary of Changes
|
|
8
|
-
|
|
9
|
-
- **Styled-components → SCSS Modules**: Converted from styled-components to SCSS modules for better performance and maintainability
|
|
10
|
-
- **TypeScript**: Added full TypeScript support with proper type definitions
|
|
11
|
-
- **Functional Component**: Already a functional component, maintained with React hooks
|
|
12
|
-
- **Prop Types**: Replaced PropTypes with TypeScript interfaces
|
|
13
|
-
- **Error Display**: Uses original `CapSomethingWentWrong` component from cap-ui-library
|
|
14
|
-
- **Translation**: Updated translation scope from `components.CapImportMFECOmponent` to `blaze.components.CapImportMFEComponent`
|
|
15
|
-
|
|
16
|
-
### Props
|
|
17
|
-
|
|
18
|
-
| Prop | Type | Required | Description |
|
|
19
|
-
|------|------|----------|-------------|
|
|
20
|
-
| `system` | `CapImportMFESystem` | Yes | Configuration object for the remote module |
|
|
21
|
-
| `system.url` | `string \| (() => Promise<string>)` | Yes | URL of the remote module (can be a string or async function) |
|
|
22
|
-
| `system.scope` | `string` | Yes | Module Federation scope name |
|
|
23
|
-
| `system.module` | `string` | Yes | Module name to import from the remote |
|
|
24
|
-
| `loadingFallback` | `React.ReactElement \| string` | No | Custom loading fallback component or string |
|
|
25
|
-
| `...rest` | `unknown` | No | Additional props passed to the imported component |
|
|
26
|
-
|
|
27
|
-
### Breaking Changes
|
|
28
|
-
|
|
29
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
30
|
-
|
|
31
|
-
All existing props and behaviors are maintained. The API remains identical.
|
|
32
|
-
|
|
33
|
-
### Behavioral Changes
|
|
34
|
-
|
|
35
|
-
- Error display uses original `CapSomethingWentWrong` component from cap-ui-library
|
|
36
|
-
- Styles are now defined using SCSS modules with variables for consistency
|
|
37
|
-
- Translation scope updated to follow blaze-ui naming conventions
|
|
38
|
-
|
|
39
|
-
### Usage
|
|
40
|
-
|
|
41
|
-
#### Basic Usage
|
|
42
|
-
|
|
43
|
-
```tsx
|
|
44
|
-
import { CapImportMFEComponent } from '@capillarytech/blaze-ui';
|
|
45
|
-
|
|
46
|
-
<CapImportMFEComponent
|
|
47
|
-
system={{
|
|
48
|
-
url: 'https://remote-app.example.com/remoteEntry.js',
|
|
49
|
-
scope: 'remoteApp',
|
|
50
|
-
module: './Component',
|
|
51
|
-
}}
|
|
52
|
-
/>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
#### With Custom Loading Fallback
|
|
56
|
-
|
|
57
|
-
```tsx
|
|
58
|
-
<CapImportMFEComponent
|
|
59
|
-
system={{
|
|
60
|
-
url: 'https://remote-app.example.com/remoteEntry.js',
|
|
61
|
-
scope: 'remoteApp',
|
|
62
|
-
module: './Component',
|
|
63
|
-
}}
|
|
64
|
-
loadingFallback={<div>Custom loading...</div>}
|
|
65
|
-
/>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
#### With Dynamic URL Function
|
|
69
|
-
|
|
70
|
-
```tsx
|
|
71
|
-
<CapImportMFEComponent
|
|
72
|
-
system={{
|
|
73
|
-
url: async () => {
|
|
74
|
-
const config = await fetch('/api/config').then(r => r.json());
|
|
75
|
-
return config.remoteUrl;
|
|
76
|
-
},
|
|
77
|
-
scope: 'remoteApp',
|
|
78
|
-
module: './Component',
|
|
79
|
-
}}
|
|
80
|
-
/>
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
#### Passing Props to Remote Component
|
|
84
|
-
|
|
85
|
-
```tsx
|
|
86
|
-
<CapImportMFEComponent
|
|
87
|
-
system={{
|
|
88
|
-
url: 'https://remote-app.example.com/remoteEntry.js',
|
|
89
|
-
scope: 'remoteApp',
|
|
90
|
-
module: './Component',
|
|
91
|
-
}}
|
|
92
|
-
customProp="value"
|
|
93
|
-
onClick={handleClick}
|
|
94
|
-
/>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Import Examples
|
|
98
|
-
|
|
99
|
-
```tsx
|
|
100
|
-
// Named import (recommended)
|
|
101
|
-
import { CapImportMFEComponent } from '@capillarytech/blaze-ui';
|
|
102
|
-
|
|
103
|
-
// With types
|
|
104
|
-
import type { CapImportMFEComponentProps, CapImportMFESystem } from '@capillarytech/blaze-ui';
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Requirements
|
|
108
|
-
|
|
109
|
-
- **Webpack 5**: This component requires Webpack 5 with Module Federation plugin
|
|
110
|
-
- **Module Federation**: The remote application must be configured with Module Federation
|
|
111
|
-
- **@module-federation/utilities**: The `importRemote` utility from `@module-federation/utilities` is required
|
|
112
|
-
|
|
113
|
-
### Error Handling
|
|
114
|
-
|
|
115
|
-
If the `system` prop is missing required fields (`url`, `scope`, or `module`), the component will display an error message using `CapError` and `CapHeading` components.
|
|
116
|
-
|
|
117
|
-
### Notes
|
|
118
|
-
|
|
119
|
-
- This component uses `React.lazy` and `React.Suspense` for code splitting
|
|
120
|
-
- The remote component is memoized based on `url`, `scope`, and `module` values
|
|
121
|
-
- All additional props passed to `CapImportMFEComponent` are forwarded to the imported remote component
|
package/CapInfoNote/Status.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapInfoNote
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-02-05 10:05:16
|
|
4
|
-
|
|
5
|
-
## Migration Steps
|
|
6
|
-
|
|
7
|
-
- [x] **Step 0**: Setup branch and remote tracking
|
|
8
|
-
- [x] **Step 1**: Migration Prompt 1 (Main migration)
|
|
9
|
-
- [x] **Step 2**: Migration Prompt 2 (Storybook support)
|
|
10
|
-
- [x] **Step 3**: Migration Prompt 3 (Unit tests)
|
|
11
|
-
- [x] **Step 4**: Migration Prompt 4 (Visual test cases)
|
|
12
|
-
- [x] **Step 5**: Linting (ESLint)
|
|
13
|
-
- [x] **Step 6**: Pre-build Validation
|
|
14
|
-
- [x] **Step 7**: Build blaze-ui
|
|
15
|
-
- [x] **Step 8**: Visual Testing
|
|
16
|
-
- [x] **Step 9**: CSS Analysis (if mismatches found)
|
|
17
|
-
- [x] **Step 9.5**: CSS Analysis Completed
|
|
18
|
-
- [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
|
|
19
|
-
- [x] **Step 11**: Create Pull Request
|
|
20
|
-
|
|
21
|
-
## Visual Testing Results
|
|
22
|
-
|
|
23
|
-
**Last Test**: 2026-02-05 10:05:16
|
|
24
|
-
**Maximum Mismatch**: 0%
|
|
25
|
-
|
|
26
|
-
### Mismatched Variants:
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## CSS Fixes Applied
|
|
31
|
-
|
|
32
|
-
**Date**: 2026-01-26 11:31:20
|
|
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/CapInfoNote/css-fix-analysis.md`_
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## Notes
|
|
39
|
-
|
|
40
|
-
_No notes yet._
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# CapInfoNote - Use Cases Analysis
|
|
2
|
-
|
|
3
|
-
## Use Cases the Component is NOT Fulfilling
|
|
4
|
-
|
|
5
|
-
Based on analysis of the component implementation and comparison with similar components (CapAlert, CapNotification), the following use cases are **NOT** currently supported:
|
|
6
|
-
|
|
7
|
-
### 1. **Dismissible/Closable Functionality**
|
|
8
|
-
- **Missing**: `closable` prop to allow users to dismiss the info note
|
|
9
|
-
- **Missing**: `onClose` callback when the note is dismissed
|
|
10
|
-
- **Impact**: Users cannot dismiss informational notes, even if they've read them
|
|
11
|
-
- **Example Use Case**: "This feature will be deprecated soon" - user should be able to dismiss after reading
|
|
12
|
-
|
|
13
|
-
### 2. **Action Buttons**
|
|
14
|
-
- **Missing**: Support for action buttons within the info note
|
|
15
|
-
- **Missing**: `actions` prop to add interactive buttons
|
|
16
|
-
- **Impact**: Cannot provide actionable info notes (e.g., "Update available" with "Update Now" button)
|
|
17
|
-
- **Example Use Case**: "New version available" with "Learn More" and "Dismiss" buttons
|
|
18
|
-
|
|
19
|
-
### 3. **Description/Additional Content**
|
|
20
|
-
- **Missing**: `description` prop for secondary content
|
|
21
|
-
- **Impact**: Cannot display detailed information beyond the main message
|
|
22
|
-
- **Example Use Case**: Title "Note" with message "System maintenance" and description "Scheduled for Jan 30, 2026 from 2-4 AM EST"
|
|
23
|
-
|
|
24
|
-
### 4. **Banner Mode**
|
|
25
|
-
- **Missing**: `banner` prop for top-of-page banner style
|
|
26
|
-
- **Impact**: Cannot use as a page-level banner notification
|
|
27
|
-
- **Example Use Case**: Site-wide announcement banner at the top of the page
|
|
28
|
-
|
|
29
|
-
### 5. **Custom Icon Override**
|
|
30
|
-
- **Missing**: Ability to pass custom icon component
|
|
31
|
-
- **Current Limitation**: Icon is hardcoded with `CapIcon` and specific styling (`color: CAP_G01, top: 9`)
|
|
32
|
-
- **Impact**: Cannot customize icon appearance or use different icon types per instance
|
|
33
|
-
- **Example Use Case**: Custom branded icon or different icon size/color
|
|
34
|
-
|
|
35
|
-
### 6. **User Interactions**
|
|
36
|
-
- **Missing**: `onClick` handler for clickable info notes
|
|
37
|
-
- **Missing**: Hover state management
|
|
38
|
-
- **Missing**: Focus management for keyboard navigation
|
|
39
|
-
- **Impact**: Component is purely presentational with no interactive capabilities
|
|
40
|
-
- **Example Use Case**: Clickable info note that expands to show more details
|
|
41
|
-
|
|
42
|
-
### 7. **Loading/Disabled States**
|
|
43
|
-
- **Missing**: `loading` prop to show loading state
|
|
44
|
-
- **Missing**: `disabled` prop to disable interactions
|
|
45
|
-
- **Impact**: Cannot show loading information or disable during async operations
|
|
46
|
-
- **Example Use Case**: "Fetching data..." with loading spinner
|
|
47
|
-
|
|
48
|
-
### 8. **Animation/Transition Control**
|
|
49
|
-
- **Missing**: `fadeIn`/`fadeOut` animation props
|
|
50
|
-
- **Missing**: Transition duration control
|
|
51
|
-
- **Impact**: No control over entry/exit animations
|
|
52
|
-
- **Example Use Case**: Smooth fade-in when info note appears
|
|
53
|
-
|
|
54
|
-
### 9. **Conditional Visibility**
|
|
55
|
-
- **Missing**: Built-in `visible` prop for show/hide control
|
|
56
|
-
- **Missing**: Auto-hide after duration (`duration` prop)
|
|
57
|
-
- **Impact**: Must manage visibility externally, no built-in auto-dismiss
|
|
58
|
-
- **Example Use Case**: Auto-dismiss after 5 seconds
|
|
59
|
-
|
|
60
|
-
### 10. **Accessibility Enhancements**
|
|
61
|
-
- **Missing**: `aria-live` region control
|
|
62
|
-
- **Missing**: `aria-atomic` for screen reader announcements
|
|
63
|
-
- **Missing**: Keyboard shortcuts (e.g., Escape to dismiss)
|
|
64
|
-
- **Impact**: Limited accessibility features beyond basic ARIA alert role
|
|
65
|
-
- **Example Use Case**: Announce info note changes to screen readers with appropriate politeness
|
|
66
|
-
|
|
67
|
-
### 11. **Size Variants**
|
|
68
|
-
- **Missing**: `size` prop (small, medium, large)
|
|
69
|
-
- **Impact**: Cannot control the size of the info note
|
|
70
|
-
- **Example Use Case**: Compact info note for dense layouts
|
|
71
|
-
|
|
72
|
-
### 12. **Placement/Layout Options**
|
|
73
|
-
- **Missing**: `placement` prop (inline, banner, floating)
|
|
74
|
-
- **Impact**: Limited layout flexibility
|
|
75
|
-
- **Example Use Case**: Floating info note in corner vs inline content
|
|
76
|
-
|
|
77
|
-
### 13. **Rich Content Support**
|
|
78
|
-
- **Missing**: Support for links, formatted text, or embedded components in message
|
|
79
|
-
- **Current**: Supports React nodes but no structured content helpers
|
|
80
|
-
- **Impact**: Must manually structure complex content
|
|
81
|
-
- **Example Use Case**: Message with clickable links or formatted text
|
|
82
|
-
|
|
83
|
-
### 14. **State Persistence**
|
|
84
|
-
- **Missing**: `key` prop for unique identification
|
|
85
|
-
- **Missing**: State management for dismissed notes (localStorage)
|
|
86
|
-
- **Impact**: Cannot persist dismissal state across page reloads
|
|
87
|
-
- **Example Use Case**: "First time user" note that shouldn't reappear after dismissal
|
|
88
|
-
|
|
89
|
-
### 15. **Event Callbacks**
|
|
90
|
-
- **Missing**: `onShow` callback when component mounts/becomes visible
|
|
91
|
-
- **Missing**: `onHide` callback when component unmounts/becomes hidden
|
|
92
|
-
- **Impact**: Cannot track when info notes are displayed
|
|
93
|
-
- **Example Use Case**: Analytics tracking for info note views
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Summary
|
|
98
|
-
|
|
99
|
-
**Total Missing Use Cases**: 15
|
|
100
|
-
|
|
101
|
-
**Priority Categories**:
|
|
102
|
-
- **High Priority**: Dismissible functionality, Action buttons, Description prop
|
|
103
|
-
- **Medium Priority**: Custom icon override, User interactions, Conditional visibility
|
|
104
|
-
- **Low Priority**: Animation control, Size variants, Event callbacks
|
|
105
|
-
|
|
106
|
-
**Current Component Capabilities**:
|
|
107
|
-
- ✅ Display informational notes with icon
|
|
108
|
-
- ✅ Customizable note text and message
|
|
109
|
-
- ✅ Support for different icon types (info, warning, success, error)
|
|
110
|
-
- ✅ Custom styling via className and style props
|
|
111
|
-
- ✅ React node support for message content
|
|
112
|
-
- ✅ Basic accessibility (alert role)
|
|
113
|
-
|
|
114
|
-
**Recommendation**: The component is currently a **presentational component** with limited interactivity. To fulfill more use cases, consider exposing additional CapAlert props or adding new interactive features.
|