@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,66 +0,0 @@
1
- # Test Cases: CapGraph (Antd v3→v6)
2
-
3
- **Component**: CapGraph
4
- **Complexity**: medium (≤20 test cases)
5
- **Source**: blaze-ui/components/CapGraph/
6
-
7
- ---
8
-
9
- ## Use cases (for Storybook & migration validation)
10
-
11
- | ID | Use Case | Props/Config | Expected Visual/Behavior | Priority | Storybook Story | Notes |
12
- |----|----------|--------------|---------------------------|----------|-----------------|--------|
13
- | UC-001 | All core prop variants | `data`, `xAxis`, `yAxis`, `graphList` (type, groupBy, colors, shape, showlabel, label), `legend` (marker, position, title), `size`, `scale`, `height` | Chart renders with correct axes, series, legend, and dimensions | P1 | PropVariants | Grouped size, scale, legend, graphList config |
14
- | UC-002 | Visual states | Default; `showGuide` + `guide`; `coord`; `y1Axis` + `y1AxisProps`; `graphList: []` | Optional sections (guide, second axis, coord) show/hide; empty graphList renders chart shell without Geoms | P1 | VisualStates | Grouped optional visual features |
15
- | UC-003 | Tooltip behavior and styling | Default tooltip; `containerTemplate`, `itemTemplate`; `g2Tooltip`, `g2TooltipList`, `g2TooltipListItem`; `tooltipData`; `showTooltip`/`tooltipDisable` on graphList item | Tooltip appears on hover with correct content and custom styles; can be disabled or fully custom per series | P0 | Tooltip | Grouped all tooltip props and behavior |
16
- | UC-004 | Content variants | Normal `data`; `data: []`; long data (many points) | Chart renders; empty data handled without crash; long data doesn’t break layout/performance | P1 | ContentVariants | Grouped normal/empty/long content |
17
- | UC-005 | Styling and chart config | `height`, `chartProps`, `guide.style` | Chart height and BizCharts options applied; guide text uses custom style | P2 | Styling | Grouped height + chartProps + guide style |
18
- | UC-006 | Axis configuration | `xAxisProps`, `yAxisProps`, `y1AxisProps` | Axis labels, ticks, and scale config applied for x, y, and optional y1 | P1 | AxisConfig | Grouped all axis prop overrides |
19
- | UC-007 | Coord and Guide | `coord` (e.g. polar); `showGuide` with `guide` (position, content, style) | Coord transforms chart (e.g. polar); guide text renders at given positions with content/style | P2 | CoordAndGuide | Grouped coord + guide usage |
20
- | UC-008 | Legend variants | `legend`: marker type (e.g. circle), position (e.g. bottom-center), title, spread `legendProps` | Legend renders with correct marker, position, and title | P1 | LegendVariants | Grouped legend options |
21
- | UC-009 | Geom types and options | `graphList`: type (line/bar/area/etc), `groupBy`, `colors`, `shape`; `showlabel` + `label` | Correct geometry and optional labels per series | P1 | GeomTypes | Grouped Geom type and label config |
22
- | UC-010 | Edge cases | `graphList: []`; omit optional props (use defaults); `data` with missing or partial keys for xAxis/yAxis | No crash; default height/empty graphList; graceful handling of malformed data | P0 | EdgeCases | Production-breaking only |
23
- | UC-011 | Tooltip template callback | `containerTemplate(tooltipData, tooltipIndex)` | Custom template receives current tooltipData and tooltipIndex (hovered point) | P2 | TooltipTemplate | Events/callbacks grouped |
24
- | UC-012 | Migration parity (v3 → v6) | Same props used in v3 and v6 (BizCharts/Chart) | Same visual and tooltip behavior after upgrade | P1 | MigrationParity | v3 vs v6 parity check |
25
-
26
- ---
27
-
28
- ## Summary
29
-
30
- - **Total**: 12 use cases (within medium limit of 20).
31
- - **P0**: UC-003 (Tooltip), UC-010 (Edge cases).
32
- - **P1**: UC-001, UC-002, UC-004, UC-006, UC-008, UC-009, UC-012.
33
- - **P2**: UC-005, UC-007, UC-011.
34
-
35
- ## Testing notes (from command)
36
-
37
- - Use **React Testing Library** with **Jest**.
38
- - Prefer `data-testid` for querying (add to CapGraph wrapper/container if needed).
39
- - Do **not** mock Cap UI Library components unless instructed.
40
- - Avoid `getByRole` for chart internals; query by testid or container.
41
- - Keep tests focused; merge scenarios to stay within limits.
42
-
43
- ---
44
-
45
- ## Google Sheets payload (for `GOOGLESHEETS_VALUES_UPDATE`)
46
-
47
- **Spreadsheet ID**: `1Xt8l8Q6Hw0cUYV65SlGvGcPnOtzprr0fukDR9UWJ3kg`
48
- **Range**: `CapGraph!A1`
49
-
50
- ```json
51
- [
52
- ["ID", "Use Case", "Props/Config", "Expected Visual/Behavior", "Priority", "Storybook Story", "Notes"],
53
- ["UC-001", "All core prop variants", "data, xAxis, yAxis, graphList (type, groupBy, colors, shape, showlabel, label), legend (marker, position, title), size, scale, height", "Chart renders with correct axes, series, legend, and dimensions", "P1", "PropVariants", "Grouped size, scale, legend, graphList config"],
54
- ["UC-002", "Visual states", "Default; showGuide + guide; coord; y1Axis + y1AxisProps; graphList: []", "Optional sections (guide, second axis, coord) show/hide; empty graphList renders chart shell without Geoms", "P1", "VisualStates", "Grouped optional visual features"],
55
- ["UC-003", "Tooltip behavior and styling", "Default tooltip; containerTemplate, itemTemplate; g2Tooltip, g2TooltipList, g2TooltipListItem; tooltipData; showTooltip/tooltipDisable on graphList item", "Tooltip appears on hover with correct content and custom styles; can be disabled or fully custom per series", "P0", "Tooltip", "Grouped all tooltip props and behavior"],
56
- ["UC-004", "Content variants", "Normal data; data: []; long data (many points)", "Chart renders; empty data handled without crash; long data doesn't break layout/performance", "P1", "ContentVariants", "Grouped normal/empty/long content"],
57
- ["UC-005", "Styling and chart config", "height, chartProps, guide.style", "Chart height and BizCharts options applied; guide text uses custom style", "P2", "Styling", "Grouped height + chartProps + guide style"],
58
- ["UC-006", "Axis configuration", "xAxisProps, yAxisProps, y1AxisProps", "Axis labels, ticks, and scale config applied for x, y, and optional y1", "P1", "AxisConfig", "Grouped all axis prop overrides"],
59
- ["UC-007", "Coord and Guide", "coord (e.g. polar); showGuide with guide (position, content, style)", "Coord transforms chart (e.g. polar); guide text renders at given positions with content/style", "P2", "CoordAndGuide", "Grouped coord + guide usage"],
60
- ["UC-008", "Legend variants", "legend: marker type (e.g. circle), position (e.g. bottom-center), title, spread legendProps", "Legend renders with correct marker, position, and title", "P1", "LegendVariants", "Grouped legend options"],
61
- ["UC-009", "Geom types and options", "graphList: type (line/bar/area/etc), groupBy, colors, shape; showlabel + label", "Correct geometry and optional labels per series", "P1", "GeomTypes", "Grouped Geom type and label config"],
62
- ["UC-010", "Edge cases", "graphList: []; omit optional props (use defaults); data with missing or partial keys for xAxis/yAxis", "No crash; default height/empty graphList; graceful handling of malformed data", "P0", "EdgeCases", "Production-breaking only"],
63
- ["UC-011", "Tooltip template callback", "containerTemplate(tooltipData, tooltipIndex)", "Custom template receives current tooltipData and tooltipIndex (hovered point)", "P2", "TooltipTemplate", "Events/callbacks grouped"],
64
- ["UC-012", "Migration parity (v3 → v6)", "Same props used in v3 and v6 (BizCharts/Chart)", "Same visual and tooltip behavior after upgrade", "P1", "MigrationParity", "v3 vs v6 parity check"]
65
- ]
66
- ```
@@ -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
@@ -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
-
@@ -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
-
@@ -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
-