@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
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
# CapHamburgerMenu
|
|
2
|
-
|
|
3
|
-
A hamburger menu component for mobile view that provides a drawer-based navigation menu with organization selection, product switching, and sidebar content.
|
|
4
|
-
|
|
5
|
-
## Migration from Ant Design v3 to v6
|
|
6
|
-
|
|
7
|
-
This component has been migrated from Ant Design v3 to v6 with the following changes:
|
|
8
|
-
|
|
9
|
-
### Breaking Changes
|
|
10
|
-
|
|
11
|
-
#### 1. Component Structure Changes
|
|
12
|
-
|
|
13
|
-
| Change | Description | Migration Guide |
|
|
14
|
-
|--------|-------------|-----------------|
|
|
15
|
-
| Class Component → Functional Component | Component converted from class to functional component | No API changes required, internal refactoring only |
|
|
16
|
-
| PropTypes → TypeScript | All PropTypes removed, replaced with TypeScript interfaces | No migration needed, types are now in `types.ts` |
|
|
17
|
-
| styled-components → CSS Modules | Removed styled-components dependency, using CSS Modules | No API changes, styling approach updated internally |
|
|
18
|
-
|
|
19
|
-
#### 2. Ant Design Drawer Component API Changes
|
|
20
|
-
|
|
21
|
-
The component uses `CapDrawer` which handles the `visible` → `open` prop migration internally. No changes needed in consumer code.
|
|
22
|
-
|
|
23
|
-
### Backward Compatibility
|
|
24
|
-
|
|
25
|
-
The component maintains full backward compatibility:
|
|
26
|
-
- All props remain the same
|
|
27
|
-
- Component behavior is unchanged
|
|
28
|
-
- Internal implementation updated to use modern React patterns
|
|
29
|
-
|
|
30
|
-
### Style Changes
|
|
31
|
-
|
|
32
|
-
**Approach**: Most styling uses CSS Modules with design tokens. Some Ant Design overrides remain due to structural requirements:
|
|
33
|
-
|
|
34
|
-
- **Drawer width (75% viewport)**: Cannot be tokenized, uses `:global` override with comment
|
|
35
|
-
- **Custom padding values**: Cannot use single-value tokens, uses CSS Modules
|
|
36
|
-
- **Layout positioning**: Footer positioning requires structural overrides
|
|
37
|
-
|
|
38
|
-
All overrides include `// OVERRIDE:` comments explaining why tokenization is not possible.
|
|
39
|
-
|
|
40
|
-
### Code Improvements
|
|
41
|
-
|
|
42
|
-
1. **Removed PropTypes**: Replaced with TypeScript interfaces in `types.ts`
|
|
43
|
-
2. **Removed defaultProps**: Using destructuring with default values in function arguments
|
|
44
|
-
3. **Converted to functional component**: Modern React hooks (`useState`, `useEffect`, `useMemo`)
|
|
45
|
-
4. **Removed styled-components**: Replaced with CSS Modules
|
|
46
|
-
5. **TypeScript support**: Full type definitions for all props and internal structures
|
|
47
|
-
6. **Improved state management**: Using React hooks for cleaner state handling
|
|
48
|
-
|
|
49
|
-
### What Stayed the Same
|
|
50
|
-
|
|
51
|
-
- All component props and API
|
|
52
|
-
- Component behavior and functionality
|
|
53
|
-
- Sidebar menu structure
|
|
54
|
-
- Organization selection logic
|
|
55
|
-
- Product switching functionality
|
|
56
|
-
- Visual appearance (styling preserved)
|
|
57
|
-
|
|
58
|
-
### What Changed
|
|
59
|
-
|
|
60
|
-
- **Removed**: `PropTypes` (replaced with TypeScript types)
|
|
61
|
-
- **Removed**: `styled-components` dependency (replaced with CSS Modules)
|
|
62
|
-
- **Removed**: Class component syntax (converted to functional component)
|
|
63
|
-
- **Updated**: State management (using React hooks)
|
|
64
|
-
- **Added**: TypeScript type definitions in `types.ts`
|
|
65
|
-
- **Added**: CSS Modules with `styles[classname]` syntax
|
|
66
|
-
|
|
67
|
-
## Props
|
|
68
|
-
|
|
69
|
-
### Standard Props
|
|
70
|
-
|
|
71
|
-
| Prop | Type | Default | Description |
|
|
72
|
-
|------|------|---------|-------------|
|
|
73
|
-
| `goToHome` | `() => void` | - | Function to navigate to home page |
|
|
74
|
-
| `placement` | `'left' \| 'right' \| 'top' \| 'bottom'` | `'left'` | Drawer placement |
|
|
75
|
-
| `productName` | `string` | - | Product name to display in drawer header |
|
|
76
|
-
| `userData` | `UserData` | `{}` | User data including organization and module information |
|
|
77
|
-
| `loadStorageItem` | `(key: string) => string \| number \| null` | - | Function to load item from storage |
|
|
78
|
-
| `changeOrgEntity` | `(orgId: number, ouId?: number) => void` | - | Function to change organization entity |
|
|
79
|
-
| `selectOrganization` | `string` | - | Text for organization selection label |
|
|
80
|
-
| `sidebarContent` | `SidebarMenuItem[]` | `[]` | Sidebar menu content items |
|
|
81
|
-
| `selectedSidebarItem` | `string` | - | Currently selected sidebar item value |
|
|
82
|
-
| `onSidebarClick` | `(item: SidebarMenuItem) => void` | - | Handler for sidebar item click |
|
|
83
|
-
| `noResultsText` | `string` | - | Text to display when no results found |
|
|
84
|
-
| `footer` | `React.ReactElement` | - | Footer element to display in drawer |
|
|
85
|
-
| `screenHeight` | `number` | - | Screen height in pixels (for virtualized list) |
|
|
86
|
-
| `screenWidth` | `number` | - | Screen width in pixels (for virtualized list) |
|
|
87
|
-
| `insights` | `string` | - | Insights product name (for internationalization) |
|
|
88
|
-
| `selectProduct` | `string` | - | Text for product selection label |
|
|
89
|
-
| `defaultSelectedProduct` | `string` | - | Default selected product value |
|
|
90
|
-
|
|
91
|
-
### Type Definitions
|
|
92
|
-
|
|
93
|
-
#### SidebarMenuItem
|
|
94
|
-
|
|
95
|
-
```typescript
|
|
96
|
-
interface SidebarMenuItem {
|
|
97
|
-
label: string;
|
|
98
|
-
value: string;
|
|
99
|
-
children?: SidebarMenuItem[];
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
#### UserData
|
|
104
|
-
|
|
105
|
-
```typescript
|
|
106
|
-
interface UserData {
|
|
107
|
-
user?: {
|
|
108
|
-
loginName?: string;
|
|
109
|
-
org_id?: string | number;
|
|
110
|
-
proxyOrgList?: Array<{
|
|
111
|
-
orgID: string | number;
|
|
112
|
-
orgName: string;
|
|
113
|
-
ouList?: Array<{
|
|
114
|
-
ouName: string;
|
|
115
|
-
ouID: string | number;
|
|
116
|
-
}>;
|
|
117
|
-
}>;
|
|
118
|
-
accessibleOUList?: Record<string, string | number>;
|
|
119
|
-
};
|
|
120
|
-
currentOrgDetails?: {
|
|
121
|
-
module_details?: Array<{
|
|
122
|
-
name: string;
|
|
123
|
-
namespace: string;
|
|
124
|
-
url: string;
|
|
125
|
-
code: string;
|
|
126
|
-
}>;
|
|
127
|
-
};
|
|
128
|
-
orgDetails?: {
|
|
129
|
-
name?: string;
|
|
130
|
-
org_id?: string | number;
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Usage
|
|
136
|
-
|
|
137
|
-
### Basic Example
|
|
138
|
-
|
|
139
|
-
```tsx
|
|
140
|
-
import CapHamburgerMenu from '@capillarytech/blaze-ui/components/CapHamburgerMenu';
|
|
141
|
-
|
|
142
|
-
const MyComponent = () => {
|
|
143
|
-
const sidebarContent = [
|
|
144
|
-
{
|
|
145
|
-
label: 'Dashboard',
|
|
146
|
-
value: 'dashboard',
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
label: 'Reports',
|
|
150
|
-
value: 'reports',
|
|
151
|
-
children: [
|
|
152
|
-
{ label: 'Sales Report', value: 'sales-report' },
|
|
153
|
-
{ label: 'Customer Report', value: 'customer-report' },
|
|
154
|
-
],
|
|
155
|
-
},
|
|
156
|
-
];
|
|
157
|
-
|
|
158
|
-
return (
|
|
159
|
-
<CapHamburgerMenu
|
|
160
|
-
productName="My Product"
|
|
161
|
-
sidebarContent={sidebarContent}
|
|
162
|
-
userData={{
|
|
163
|
-
user: {
|
|
164
|
-
loginName: 'john.doe',
|
|
165
|
-
},
|
|
166
|
-
}}
|
|
167
|
-
loadStorageItem={(key) => localStorage.getItem(key)}
|
|
168
|
-
changeOrgEntity={(orgId, ouId) => {
|
|
169
|
-
console.log('Changed org:', orgId, ouId);
|
|
170
|
-
}}
|
|
171
|
-
selectOrganization="Select Organization"
|
|
172
|
-
onSidebarClick={(item) => {
|
|
173
|
-
console.log('Clicked:', item.value);
|
|
174
|
-
}}
|
|
175
|
-
/>
|
|
176
|
-
);
|
|
177
|
-
};
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### With Organization Selection
|
|
181
|
-
|
|
182
|
-
```tsx
|
|
183
|
-
<CapHamburgerMenu
|
|
184
|
-
productName="Analytics"
|
|
185
|
-
userData={{
|
|
186
|
-
user: {
|
|
187
|
-
loginName: 'user@example.com',
|
|
188
|
-
proxyOrgList: [
|
|
189
|
-
{
|
|
190
|
-
orgID: 1,
|
|
191
|
-
orgName: 'Organization 1',
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
orgID: 2,
|
|
195
|
-
orgName: 'Organization 2',
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
},
|
|
199
|
-
orgDetails: {
|
|
200
|
-
name: 'Organization 1',
|
|
201
|
-
org_id: 1,
|
|
202
|
-
},
|
|
203
|
-
}}
|
|
204
|
-
loadStorageItem={(key) => {
|
|
205
|
-
const value = localStorage.getItem(key);
|
|
206
|
-
return value ? parseInt(value, 10) : null;
|
|
207
|
-
}}
|
|
208
|
-
changeOrgEntity={(orgId, ouId) => {
|
|
209
|
-
localStorage.setItem('orgID', String(orgId));
|
|
210
|
-
if (ouId) {
|
|
211
|
-
localStorage.setItem('ouId', String(ouId));
|
|
212
|
-
}
|
|
213
|
-
}}
|
|
214
|
-
selectOrganization="Select Organization"
|
|
215
|
-
screenHeight={window.innerHeight}
|
|
216
|
-
screenWidth={window.innerWidth}
|
|
217
|
-
/>
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
## Dependencies
|
|
221
|
-
|
|
222
|
-
The component uses the following external packages (already included in `blaze-ui` dependencies):
|
|
223
|
-
|
|
224
|
-
- `react-virtualized`: For virtualized list rendering
|
|
225
|
-
- `semantic-ui-react`: For List component
|
|
226
|
-
- `lodash`: For utility functions (peer dependency)
|
|
227
|
-
|
|
228
|
-
## Notes
|
|
229
|
-
|
|
230
|
-
- The component is designed for mobile views
|
|
231
|
-
- Organization selection uses virtualized lists for performance
|
|
232
|
-
- Product switching navigates to different module URLs
|
|
233
|
-
- Sidebar menu supports nested items with expand/collapse functionality
|
|
234
|
-
- Component uses CSS Modules for styling with design tokens where possible
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Test Cases: CapHamburgerMenu (Antd v3→v6)
|
|
2
|
-
|
|
3
|
-
## Use Cases
|
|
4
|
-
|
|
5
|
-
| ID | Use Case | Props/Config | Expected Visual/Behavior | Priority | Storybook Story | Notes |
|
|
6
|
-
|----|----------|--------------|-------------------------|----------|-----------------|-------|
|
|
7
|
-
| UC-001 | Drawer open/close interactions | Click hamburger icon | Drawer opens from left side, clicking icon again closes drawer, clicking outside closes drawer | P0 | DrawerInteractions | Core functionality - drawer toggle |
|
|
8
|
-
| UC-002 | Sidebar content rendering - empty state | sidebarContent: [] or undefined | No menu items displayed, only header with logo and user info | P1 | EmptySidebar | Empty state handling |
|
|
9
|
-
| UC-003 | Sidebar content rendering - flat menu items | sidebarContent: [{label: "Item1", value: "1"}, {label: "Item2", value: "2"}] | Menu items render as flat list without expand/collapse icons | P0 | FlatMenuItems | Basic menu rendering |
|
|
10
|
-
| UC-004 | Sidebar content rendering - nested menu items | sidebarContent: [{label: "Parent", children: [{label: "Child1", value: "c1"}]}] | Parent item shows chevron icon, first parent expanded by default, children render when expanded | P0 | NestedMenuItems | Expandable menu structure |
|
|
11
|
-
| UC-005 | Menu item expansion/collapse | Click parent menu item with children | Parent item toggles expanded state, chevron icon changes (up/down), children show/hide | P0 | MenuExpansion | Interactive menu behavior |
|
|
12
|
-
| UC-006 | Sidebar item selection | selectedSidebarItem: "item1", onSidebarClick handler | Selected item shows selected styling (blue background, left border), clicking different item calls onSidebarClick, clicking same item does nothing | P0 | SidebarSelection | Selection state and callbacks |
|
|
13
|
-
| UC-007 | Organization selection display - no selection | loadStorageItem returns null/undefined | Shows "Select Organization" placeholder text with logo icon | P1 | OrgDisplayNoSelection | Default state |
|
|
14
|
-
| UC-008 | Organization selection display - org only | loadStorageItem('orgID') returns valid org, no OU | Shows organization name with logo icon, chevron-right icon | P0 | OrgDisplayOrgOnly | Basic org display |
|
|
15
|
-
| UC-009 | Organization selection display - org with OU | loadStorageItem returns org and OU | Shows OU name as primary label, org name as secondary label below, both with ellipsis for overflow | P0 | OrgDisplayWithOU | Nested org structure |
|
|
16
|
-
| UC-010 | Organization selection box open/close | Click organization selection area | Opens CapSlideBox with search input and org list, back button closes slidebox | P0 | OrgSelectionBox | Slidebox interaction |
|
|
17
|
-
| UC-011 | Organization search functionality | Type in search input, orgSearchText state updates | Filters org list by label (case-insensitive), filters OU list within orgs, shows filtered results | P0 | OrgSearch | Search filtering |
|
|
18
|
-
| UC-012 | Organization search - no results | Search query matches no orgs/OUs | Shows no results state with alert icon and noResultsText message | P1 | OrgSearchNoResults | Empty search state |
|
|
19
|
-
| UC-013 | Organization selection - org without OUs | Click org item without accessibleOus | Calls changeOrgEntity with orgID, closes slidebox, updates selected org display | P0 | OrgSelectionSimple | Basic org selection |
|
|
20
|
-
| UC-014 | Organization selection - org with OUs | Click org item with accessibleOus, then click OU | Shows OU list under org, clicking OU calls changeOrgEntity with orgID and ouId, updates display to show OU | P0 | OrgSelectionWithOU | Nested selection flow |
|
|
21
|
-
| UC-015 | Product list display | Click more applications icon | Opens CapSlideBox with product list from module_details, excludes "masters" product, shows insights+ product | P0 | ProductListDisplay | Product list rendering |
|
|
22
|
-
| UC-016 | Product change | Click product item in list | If product.url differs from current pathname, navigates to product.url, closes product list | P0 | ProductChange | Navigation behavior |
|
|
23
|
-
| UC-017 | Product list - selected product | defaultSelectedProduct matches product value | Selected product shows selected styling (blue background, left border) | P1 | ProductSelection | Visual selection state |
|
|
24
|
-
| UC-018 | Header content display | productName, userData.user.loginName provided | Shows more applications icon, logo with productName, user loginName below logo, organization selection | P0 | HeaderContent | Header rendering |
|
|
25
|
-
| UC-019 | Footer display | footer prop provided as React element | Footer renders at bottom of drawer when drawer is open, shows ant-drawer-footer styling | P1 | FooterDisplay | Footer rendering |
|
|
26
|
-
| UC-020 | Placement and styling props | placement: "left" | "right", screenHeight, screenWidth, className | Drawer opens from specified side, org list height calculated from screenHeight, search width from screenWidth, custom className applied | P1 | PlacementAndStyling | Layout and positioning |
|
|
27
|
-
|
|
28
|
-
## Grouping Rationale
|
|
29
|
-
|
|
30
|
-
- **UC-001**: Grouped all drawer open/close interactions (icon click, outside click, toggle)
|
|
31
|
-
- **UC-002-004**: Grouped all sidebar content rendering scenarios (empty, flat, nested)
|
|
32
|
-
- **UC-005**: Single test for expansion/collapse toggle behavior
|
|
33
|
-
- **UC-006**: Single test for selection state and callback handling
|
|
34
|
-
- **UC-007-009**: Grouped all organization display variants (no selection, org only, org+OU)
|
|
35
|
-
- **UC-010**: Single test for slidebox open/close
|
|
36
|
-
- **UC-011-012**: Grouped search functionality and empty state
|
|
37
|
-
- **UC-013-014**: Grouped organization selection scenarios (simple and with OUs)
|
|
38
|
-
- **UC-015-017**: Grouped product list display, change, and selection
|
|
39
|
-
- **UC-018**: Single test for all header content
|
|
40
|
-
- **UC-019**: Single test for footer
|
|
41
|
-
- **UC-020**: Grouped all layout/styling props
|
|
42
|
-
|
|
43
|
-
## Migration Notes (v3→v6)
|
|
44
|
-
|
|
45
|
-
- CapDrawer uses `visible` prop (v3) vs `open` prop (v6) - verify prop name migration
|
|
46
|
-
- Virtualized.List from react-virtualized used for org list - verify if needs migration to react-window or similar
|
|
47
|
-
- Semantic UI List component used - verify if needs migration to Ant Design List
|
|
48
|
-
- componentWillReceiveProps deprecated - verify migration to componentDidUpdate or getDerivedStateFromProps
|
package/CapHeader/Status.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapHeader
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-01-29 10:15:36
|
|
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-01-29 10:15:36
|
|
24
|
-
**Maximum Mismatch**: 4.69%
|
|
25
|
-
|
|
26
|
-
### Mismatched Variants:
|
|
27
|
-
- ✅ All variants match perfectly!
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## CSS Fixes Applied
|
|
31
|
-
|
|
32
|
-
**Date**: 2026-01-29 10:15:36
|
|
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/CapHeader/css-fix-analysis.md`_
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## Notes
|
|
39
|
-
|
|
40
|
-
_No notes yet._
|
|
41
|
-
|
package/CapHeading/README.md
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
# CapHeading Migration Guide
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
CapHeading has been migrated from `cap-ui-library` to `blaze-ui` with the following changes:
|
|
6
|
-
|
|
7
|
-
- Converted from styled-components to SCSS modules
|
|
8
|
-
- Converted from JavaScript to TypeScript
|
|
9
|
-
- Added TypeScript interfaces for props
|
|
10
|
-
- Added ref forwarding support
|
|
11
|
-
- Maintained backward compatibility with the existing API
|
|
12
|
-
|
|
13
|
-
## Breaking Changes
|
|
14
|
-
|
|
15
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
16
|
-
|
|
17
|
-
The API remains identical to the original implementation.
|
|
18
|
-
|
|
19
|
-
## Prop Changes
|
|
20
|
-
|
|
21
|
-
| Prop | Type | Default | Status | Notes |
|
|
22
|
-
|------|------|---------|--------|-------|
|
|
23
|
-
| `type` | `CapHeadingType` | `'h5'` | Unchanged | Now TypeScript union type |
|
|
24
|
-
| `children` | `React.ReactNode` | - | Unchanged | - |
|
|
25
|
-
| `className` | `string` | `''` | Added | For custom styling |
|
|
26
|
-
| `style` | `React.CSSProperties` | `{}` | Added | For inline styles |
|
|
27
|
-
|
|
28
|
-
### New TypeScript Types
|
|
29
|
-
|
|
30
|
-
```typescript
|
|
31
|
-
type CapHeadingType =
|
|
32
|
-
| 'h0' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'h9' | 'h10'
|
|
33
|
-
| 'label1' | 'label2' | 'label3' | 'label4' | 'label5' | 'label6';
|
|
34
|
-
|
|
35
|
-
interface CapHeadingProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
36
|
-
children?: React.ReactNode;
|
|
37
|
-
type?: CapHeadingType;
|
|
38
|
-
className?: string;
|
|
39
|
-
style?: React.CSSProperties;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
interface CapHeadingSpanProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
43
|
-
children?: React.ReactNode;
|
|
44
|
-
type?: CapHeadingType;
|
|
45
|
-
className?: string;
|
|
46
|
-
style?: React.CSSProperties;
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## API Changes
|
|
51
|
-
|
|
52
|
-
### Ref Forwarding (New)
|
|
53
|
-
|
|
54
|
-
The component now supports ref forwarding:
|
|
55
|
-
|
|
56
|
-
```tsx
|
|
57
|
-
const headingRef = React.createRef<HTMLDivElement>();
|
|
58
|
-
<CapHeading ref={headingRef}>Content</CapHeading>
|
|
59
|
-
|
|
60
|
-
const spanRef = React.createRef<HTMLSpanElement>();
|
|
61
|
-
<CapHeading.CapHeadingSpan ref={spanRef}>Content</CapHeading.CapHeadingSpan>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### HTML Attributes (New)
|
|
65
|
-
|
|
66
|
-
All standard HTML div/span attributes are now supported:
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
<CapHeading
|
|
70
|
-
data-testid="my-heading"
|
|
71
|
-
aria-label="Section heading"
|
|
72
|
-
onClick={handleClick}
|
|
73
|
-
>
|
|
74
|
-
Content
|
|
75
|
-
</CapHeading>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Behavioral Changes
|
|
79
|
-
|
|
80
|
-
None. The component behaves identically to the original implementation.
|
|
81
|
-
|
|
82
|
-
## Migration Steps
|
|
83
|
-
|
|
84
|
-
### 1. Update Import
|
|
85
|
-
|
|
86
|
-
```tsx
|
|
87
|
-
// Before (cap-ui-library)
|
|
88
|
-
import CapHeading from '@capillarytech/cap-ui-library/CapHeading';
|
|
89
|
-
|
|
90
|
-
// After (blaze-ui)
|
|
91
|
-
import { CapHeading } from '@capillarytech/blaze-ui';
|
|
92
|
-
// or
|
|
93
|
-
import CapHeading from '@capillarytech/blaze-ui/CapHeading';
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### 2. Usage (No Changes Required)
|
|
97
|
-
|
|
98
|
-
```tsx
|
|
99
|
-
// Both work exactly the same
|
|
100
|
-
<CapHeading type="h1">Main Heading</CapHeading>
|
|
101
|
-
<CapHeading type="label1">Label Text</CapHeading>
|
|
102
|
-
|
|
103
|
-
// Span variant
|
|
104
|
-
<CapHeading.CapHeadingSpan type="h4">Inline Heading</CapHeading.CapHeadingSpan>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### 3. TypeScript (New Benefit)
|
|
108
|
-
|
|
109
|
-
If using TypeScript, you now get full type checking:
|
|
110
|
-
|
|
111
|
-
```tsx
|
|
112
|
-
import { CapHeading, CapHeadingProps, CapHeadingType } from '@capillarytech/blaze-ui';
|
|
113
|
-
|
|
114
|
-
// Type-safe props
|
|
115
|
-
const props: CapHeadingProps = {
|
|
116
|
-
type: 'h1', // TypeScript will autocomplete and validate
|
|
117
|
-
children: 'Heading'
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
// Type-safe heading type
|
|
121
|
-
const headingType: CapHeadingType = 'h2';
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Heading Type Reference
|
|
125
|
-
|
|
126
|
-
| Type | Font Size | Font Weight | Color | Line Height | Use Case |
|
|
127
|
-
|------|-----------|-------------|-------|-------------|----------|
|
|
128
|
-
| h0 | 28px (2rem) | 500 | #091e42 | 36px | Extra large heading |
|
|
129
|
-
| h1 | 24px (1.714rem) | 500 | #091e42 | 32px | Main heading |
|
|
130
|
-
| h2 | 20px (1.429rem) | 500 | #091e42 | 28px | Section heading |
|
|
131
|
-
| h3 | 16px (1.143rem) | 500 | #091e42 | 24px | Sub-section heading |
|
|
132
|
-
| h4 | 14px (1rem) | 500 | #091e42 | 20px | Minor heading (medium) |
|
|
133
|
-
| h5 | 14px (1rem) | 400 | #091e42 | 20px | Minor heading (normal) - DEFAULT |
|
|
134
|
-
| h6 | 14px (1rem) | 400 | #5e6c84 | 20px | Secondary text |
|
|
135
|
-
| h7 | 20px (1.429rem) | 500 | #5e6c84 | 28px | Section heading (secondary) |
|
|
136
|
-
| h8 | 14px (1rem) | 400 | #091e42 | 20px | Body text style |
|
|
137
|
-
| h9 | 14px (1rem) | 500 | #ffffff | 20px | White text (dark bg) |
|
|
138
|
-
| h10 | 12px (0.857rem) | 500 | #091e42 | 16px | Small heading |
|
|
139
|
-
| label1 | 12px (0.857rem) | 400 | #5e6c84 | 20px | Standard label |
|
|
140
|
-
| label2 | 12px (0.857rem) | 400 | #091e42 | 20px | Primary color label |
|
|
141
|
-
| label3 | 12px (0.857rem) | 400 | #97a0af | 20px | Muted label |
|
|
142
|
-
| label4 | 12px (0.857rem) | 400 | #5e6c84 | 16px | Compact label |
|
|
143
|
-
| label5 | 16px (1.143rem) | 400 | #5e6c84 | 24px | Large label |
|
|
144
|
-
| label6 | 16px (1.143rem) | 400 | #091e42 | 24px | Large primary label |
|
|
145
|
-
|
|
146
|
-
## Examples
|
|
147
|
-
|
|
148
|
-
### Basic Usage
|
|
149
|
-
|
|
150
|
-
```tsx
|
|
151
|
-
import { CapHeading } from '@capillarytech/blaze-ui';
|
|
152
|
-
|
|
153
|
-
function App() {
|
|
154
|
-
return (
|
|
155
|
-
<div>
|
|
156
|
-
<CapHeading type="h1">Page Title</CapHeading>
|
|
157
|
-
<CapHeading type="h2">Section Title</CapHeading>
|
|
158
|
-
<CapHeading type="label1">Form Label</CapHeading>
|
|
159
|
-
</div>
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Inline Heading with CapHeadingSpan
|
|
165
|
-
|
|
166
|
-
```tsx
|
|
167
|
-
import { CapHeading } from '@capillarytech/blaze-ui';
|
|
168
|
-
|
|
169
|
-
function App() {
|
|
170
|
-
return (
|
|
171
|
-
<p>
|
|
172
|
-
This paragraph contains an{' '}
|
|
173
|
-
<CapHeading.CapHeadingSpan type="h4">
|
|
174
|
-
inline heading
|
|
175
|
-
</CapHeading.CapHeadingSpan>{' '}
|
|
176
|
-
inside it.
|
|
177
|
-
</p>
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### With Accessibility Attributes
|
|
183
|
-
|
|
184
|
-
```tsx
|
|
185
|
-
import { CapHeading } from '@capillarytech/blaze-ui';
|
|
186
|
-
|
|
187
|
-
function App() {
|
|
188
|
-
return (
|
|
189
|
-
<CapHeading
|
|
190
|
-
type="h1"
|
|
191
|
-
role="heading"
|
|
192
|
-
aria-level={1}
|
|
193
|
-
>
|
|
194
|
-
Accessible Main Heading
|
|
195
|
-
</CapHeading>
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### With Ref
|
|
201
|
-
|
|
202
|
-
```tsx
|
|
203
|
-
import { CapHeading } from '@capillarytech/blaze-ui';
|
|
204
|
-
import { useRef, useEffect } from 'react';
|
|
205
|
-
|
|
206
|
-
function App() {
|
|
207
|
-
const headingRef = useRef<HTMLDivElement>(null);
|
|
208
|
-
|
|
209
|
-
useEffect(() => {
|
|
210
|
-
headingRef.current?.focus();
|
|
211
|
-
}, []);
|
|
212
|
-
|
|
213
|
-
return (
|
|
214
|
-
<CapHeading ref={headingRef} tabIndex={-1}>
|
|
215
|
-
Focusable Heading
|
|
216
|
-
</CapHeading>
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
|
package/CapHeading/Status.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapHeading
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-01-25 04:03:57
|
|
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-01-25 04:03:57
|
|
24
|
-
**Maximum Mismatch**: 2.95%
|
|
25
|
-
|
|
26
|
-
### Mismatched Variants:
|
|
27
|
-
- ✅ All variants match perfectly!
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## CSS Fixes Applied
|
|
31
|
-
|
|
32
|
-
**Date**: 2026-01-25 04:03:57
|
|
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/CapHeading/css-fix-analysis.md`_
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## Notes
|
|
39
|
-
|
|
40
|
-
_No notes yet._
|
|
41
|
-
|