@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,126 +0,0 @@
1
- # CapRoadMap
2
-
3
- A roadmap component built on Ant Design's Timeline component, displaying a series of roadmap items with custom styling.
4
-
5
- ## Migration from cap-ui-library
6
-
7
- This component has been migrated from `@capillarytech/cap-ui-library` to `@capillarytech/blaze-ui` with the following changes:
8
-
9
- - Converted from JavaScript to TypeScript
10
- - Converted from styled-components to SCSS modules
11
- - Migrated to Ant Design v6 APIs
12
- - Added TypeScript interfaces for props
13
- - Maintained backward compatibility with the existing API
14
-
15
- ## Breaking Changes
16
-
17
- **No breaking changes from cap-ui-library v8.x**
18
-
19
- The component maintains backward compatibility with the previous version.
20
-
21
- ## Deprecated Props
22
-
23
- ### Ant Design Component Usage
24
-
25
- This component uses Ant Design's **Timeline** component internally. The following Ant Design API changes are relevant:
26
-
27
- #### `Timeline.Item` (Internal Usage - Deprecated)
28
-
29
- - **Status:** Deprecated in Ant Design v6
30
- - **Replacement:** Use Timeline's `items` prop instead of `Timeline.Item` children
31
- - **Impact:** Internal implementation detail - no impact on CapRoadMap API
32
- - **Migration:** The component will be migrated to use Timeline's `items` prop pattern in a future update
33
-
34
- **Note:** `Timeline.Item` still works in Ant Design v6 for backward compatibility, but the recommended approach is to use the `items` prop pattern. This is an internal implementation detail and does not affect the CapRoadMap component's public API.
35
-
36
- **Example of Ant Design Timeline v6 pattern (for reference):**
37
-
38
- ```tsx
39
- // ❌ Deprecated pattern (currently used internally)
40
- <Timeline>
41
- <Timeline.Item icon={icon}>Content</Timeline.Item>
42
- <Timeline.Item>Content</Timeline.Item>
43
- </Timeline>
44
-
45
- // ✅ Recommended pattern (future migration)
46
- <Timeline
47
- items={[
48
- { icon: icon, children: 'Content' },
49
- { children: 'Content' }
50
- ]}
51
- />
52
- ```
53
-
54
- ### CapRoadMap Props
55
-
56
- **No deprecated props** - All CapRoadMap props remain unchanged and fully supported.
57
-
58
- ## Prop Changes
59
-
60
- | Prop | Status | Notes |
61
- |------|--------|-------|
62
- | `className` | ✅ Unchanged | Custom CSS class name |
63
- | `roadMapPanes` | ✅ Unchanged | Array of roadmap pane objects |
64
- | `defaultRoadMapDisabledMessage` | ✅ Unchanged | Message shown when a roadmap item is disabled |
65
-
66
- ### RoadMapPane Interface
67
-
68
- | Prop | Type | Default | Description |
69
- |------|------|---------|-------------|
70
- | `key` | `string` | `''` | Unique identifier for the roadmap item |
71
- | `roadMapImage` | `string` | `''` | Image/icon to display as the timeline dot |
72
- | `title` | `string` | `''` | Title text for the roadmap item |
73
- | `description` | `string` | `''` | Description text for the roadmap item |
74
- | `disabled` | `boolean` | `false` | Whether the roadmap item is disabled |
75
-
76
- ## API Changes
77
-
78
- - **TypeScript Support:** Full TypeScript support with exported `CapRoadMapProps` and `RoadMapPane` interfaces
79
- - **Ant Design Version:** Upgraded from Ant Design v3 to v6
80
- - **Styling:** Migrated from styled-components to SCSS modules
81
-
82
- ## Usage
83
-
84
- ```tsx
85
- import { CapRoadMap } from '@capillarytech/blaze-ui';
86
-
87
- const roadMapPanes = [
88
- {
89
- key: '1',
90
- roadMapImage: '🚀',
91
- title: 'Phase 1',
92
- description: 'Initial setup and configuration',
93
- disabled: false,
94
- },
95
- {
96
- key: '2',
97
- roadMapImage: '📊',
98
- title: 'Phase 2',
99
- description: 'Data migration and validation',
100
- disabled: false,
101
- },
102
- {
103
- key: '3',
104
- roadMapImage: '✅',
105
- title: 'Phase 3',
106
- description: 'Final testing and deployment',
107
- disabled: true,
108
- },
109
- ];
110
-
111
- <CapRoadMap
112
- roadMapPanes={roadMapPanes}
113
- defaultRoadMapDisabledMessage="This phase is not yet available"
114
- />
115
- ```
116
-
117
- ## Internal Implementation Notes
118
-
119
- - The component uses Ant Design's `Timeline.Item` internally, which is deprecated in Ant Design v6
120
- - Future migration will update to use Timeline's `items` prop pattern
121
- - This change will be internal and will not affect the component's public API
122
-
123
- ## Related Components
124
-
125
- - `CapTimeline` - More advanced timeline component with additional features
126
- - `CapTimelineNested` - Nested timeline component
@@ -1,53 +0,0 @@
1
- # Migration Status: CapRoadMap
2
-
3
- **Last Updated**: 2026-02-06 09:38:10
4
-
5
- ## Migration Steps
6
-
7
- - [x] **Step 0**: Setup branch and remote tracking
8
- - [x] **Step 1**: Migration Prompt 1 (Main migration)
9
- - [x] **Step 1.5**: Export component in blaze-ui/components/index.ts
10
- - [x] **Step 2**: Migration Prompt 2 (Storybook support)
11
- - [x] **Step 2.5**: Verify deprecated props and prop changes (REQUIRED - enforced)
12
- - [x] **Step 3**: Migration Prompt 3 (Unit tests)
13
- - [x] **Step 4**: Migration Prompt 4 (Visual test cases)
14
- - [x] **Step 5**: Linting (ESLint)
15
- - [x] **Step 6**: Pre-build Validation
16
- - [x] **Step 7**: Build blaze-ui
17
- - [x] **Step 8**: Visual Testing
18
- - [x] **Step 9**: CSS Analysis (if mismatches found)
19
- - [x] **Step 9.5**: CSS Analysis Completed
20
- - [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
21
- - [x] **Step 11**: Create Pull Request
22
-
23
- ## Deprecated Props Verification
24
-
25
- _No deprecated props verification results yet._
26
-
27
- **Note**: Step 2.5 is REQUIRED and enforced.
28
- - Focus: **Ant Design component prop changes** (e.g., Dropdown, Input, Alert, Tooltip, etc.)
29
- - Reference: MIGRATION_CHANGELOG_TEMPLATE.md for format, ANTD_V6_MIGRATION.md for Ant Design deprecated APIs
30
- - Skip: If original component doesn't exist in cap-ui-library
31
- - All deprecated Ant Design props and prop changes must be documented before proceeding.
32
-
33
- ## Visual Testing Results
34
-
35
- **Last Test**: 2026-02-06 09:38:10
36
- **Maximum Mismatch**: 4.62%
37
-
38
- ### Mismatched Variants:
39
- - with-images:4.62%
40
- - long-content:4.37%
41
-
42
-
43
- ## CSS Fixes Applied
44
-
45
- **Date**: 2026-01-31 23:36:33
46
- **Summary**: CSS fixes applied based on visual testing analysis.
47
-
48
- _See full analysis in: `/Users/sarahkhader/repos/migration/blaze-ui/tools/visual-testing/report/CapRoadMap/css-fix-analysis.md`_
49
-
50
-
51
- ## Notes
52
-
53
- _No notes yet._
@@ -1,92 +0,0 @@
1
- # CapRoadMap Use Case Gaps Analysis
2
-
3
- ## Phase 0: Google Sheets Access
4
-
5
- **Status**: ⚠️ **Unable to access Google Sheets**
6
-
7
- - MCP Server `google_sheets` was not available
8
- - Spreadsheet ID: `1Xt8l8Q6Hw0cUYV65SlGvGcPnOtzprr0fukDR9UWJ3kg`
9
- - Tab: `CapRoadMap`
10
-
11
- **Action Required**: Manual review of Google Sheets to compare use cases against component implementation.
12
-
13
- ---
14
-
15
- ## Phase 1: Use Cases NOT Fulfilled by CapRoadMap
16
-
17
- Based on component analysis, the following use cases are **NOT** currently supported:
18
-
19
- ### 1. **Interactive Features**
20
- - ❌ **Click handlers**: No `onClick` or `onPaneClick` callbacks
21
- - ❌ **Navigation**: No ability to navigate to different phases
22
- - ❌ **Selection**: No way to mark/select active or current phase
23
- - ❌ **Hover effects**: No hover state handling or tooltips
24
- - ❌ **Focus management**: No keyboard navigation or focus handling
25
-
26
- ### 2. **Dynamic Content**
27
- - ❌ **Loading states**: No loading indicator for async data
28
- - ❌ **Error states**: No error handling or error display
29
- - ❌ **Empty states**: No custom empty state message
30
- - ❌ **Progress tracking**: No progress indicators or completion status
31
-
32
- ### 3. **Customization**
33
- - ❌ **Custom styling per pane**: All panes use same styling
34
- - ❌ **Custom icons/images per state**: Only single `roadMapImage` per pane
35
- - ❌ **Conditional rendering**: No ability to show/hide specific panes
36
- - ❌ **Sorting/filtering**: No ability to reorder or filter panes
37
-
38
- ### 4. **Accessibility Enhancements**
39
- - ❌ **ARIA labels**: No custom ARIA labels for panes
40
- - ❌ **Keyboard navigation**: No arrow key navigation between panes
41
- - ❌ **Screen reader announcements**: No announcements for state changes
42
- - ❌ **Focus indicators**: No visible focus indicators for keyboard users
43
-
44
- ### 5. **Data Features**
45
- - ❌ **Date/time display**: No date or time information per phase
46
- - ❌ **Status indicators**: No status beyond disabled/enabled
47
- - ❌ **Completion tracking**: No percentage or completion status
48
- - ❌ **Dependencies**: No way to show phase dependencies
49
-
50
- ### 6. **User Interactions**
51
- - ❌ **Expand/collapse**: No ability to expand/collapse panes
52
- - ❌ **Drag and drop**: No reordering capability
53
- - ❌ **Inline editing**: No editing capabilities
54
- - ❌ **Actions menu**: No action buttons per pane
55
-
56
- ---
57
-
58
- ## Current Component Capabilities
59
-
60
- The component **DOES** support:
61
-
62
- ✅ **Basic rendering**: Displays roadmap panes in timeline format
63
- ✅ **Disabled state**: Shows disabled message when pane is disabled
64
- ✅ **Custom images**: Supports `roadMapImage` per pane
65
- ✅ **Custom className**: Supports custom CSS classes
66
- ✅ **Title and description**: Displays title and description per pane
67
- ✅ **Conditional description**: Shows disabled message when disabled
68
-
69
- ---
70
-
71
- ## Recommendations
72
-
73
- 1. **Review Google Sheets**: Manually review the use cases in Google Sheets to identify which gaps are actual requirements
74
- 2. **Prioritize gaps**: Determine which missing features are critical vs. nice-to-have
75
- 3. **Enhance component**: Add missing features based on priority
76
- 4. **Update tests**: Add tests for any new features added
77
-
78
- ---
79
-
80
- ## Test Coverage Status
81
-
82
- ✅ **Tests implemented** covering:
83
- - Default rendering
84
- - Prop variations
85
- - Disabled state handling
86
- - Edge cases (empty, null, undefined)
87
- - Data flow and state management
88
- - Conditional rendering logic
89
- - Accessibility (basic)
90
- - Backward compatibility
91
-
92
- **Note**: Tests focus on current component capabilities. Additional tests will be needed if new features are added.
package/CapRow/README.md DELETED
@@ -1,424 +0,0 @@
1
- # CapRow Migration Documentation
2
-
3
- ## Summary
4
-
5
- `CapRow` has been migrated from `@capillarytech/cap-ui-library` (Ant Design v3) to `@capillarytech/blaze-ui` (Ant Design v6). The component is a wrapper around Ant Design's `Row` component with additional styling and layout utilities.
6
-
7
- ## Migration Changes
8
-
9
- ### Component Structure
10
-
11
- **Before (cap-ui-library):**
12
- - Class component
13
- - Simple wrapper with minimal props
14
- - Basic className support
15
-
16
- **After (blaze-ui):**
17
- - Functional component with React hooks
18
- - Enhanced props for layout control
19
- - TypeScript with full type definitions
20
- - SCSS modules instead of styled-components
21
-
22
- ## Props
23
-
24
- ### Props Comparison
25
-
26
- | Prop | cap-ui-library | blaze-ui | Status |
27
- |------|----------------|----------|--------|
28
- | `children` | ✅ | ✅ | **Unchanged** |
29
- | `className` | ✅ | ✅ | **Unchanged** |
30
- | `style` | ❌ | ✅ | **Added** |
31
- | `justify` | ❌ | ✅ | **Added** |
32
- | `align` | ❌ | ✅ | **Added** |
33
- | `gutter` | ❌ | ✅ | **Added** |
34
- | `wrap` | ❌ | ✅ | **Added** |
35
- | `width` | ❌ | ✅ | **Added** |
36
- | `height` | ❌ | ✅ | **Added** |
37
- | `margin` | ❌ | ✅ | **Added** |
38
- | `padding` | ❌ | ✅ | **Added** |
39
- | `fullWidth` | ❌ | ✅ | **Added** |
40
- | `fullHeight` | ❌ | ✅ | **Added** |
41
- | `fillSpace` | ❌ | ✅ | **Added** |
42
- | `responsive` | ❌ | ✅ | **Added** |
43
- | `vertical` | ❌ | ✅ | **Added** (deprecated) |
44
- | `noWrap` | ❌ | ✅ | **Added** |
45
- | `gap` | ❌ | ✅ | **Added** |
46
-
47
- ### All Ant Design Row Props
48
-
49
- The component extends all Ant Design v6 `Row` props, so you can use any valid `RowProps` from Ant Design v6.
50
-
51
- ## New Props
52
-
53
- ### Layout Control Props
54
-
55
- #### `justify`
56
- - **Type:** `'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly'`
57
- - **Default:** `'start'`
58
- - **Description:** Defines how items are distributed along the main axis (horizontal alignment)
59
- - **Example:**
60
- ```tsx
61
- <CapRow justify="space-between">
62
- <div>Left</div>
63
- <div>Right</div>
64
- </CapRow>
65
- ```
66
-
67
- #### `align`
68
- - **Type:** `'top' | 'middle' | 'bottom' | 'stretch'`
69
- - **Default:** `'top'`
70
- - **Description:** Defines how items are aligned along the cross axis (vertical alignment)
71
- - **Example:**
72
- ```tsx
73
- <CapRow align="middle">
74
- <div>Item 1</div>
75
- <div>Item 2</div>
76
- </CapRow>
77
- ```
78
-
79
- #### `gutter`
80
- - **Type:** `number | Record<string, unknown> | number[]`
81
- - **Default:** `0`
82
- - **Description:** Spacing between columns (in pixels). Can be a number, object with breakpoints, or array for [horizontal, vertical]
83
- - **Example:**
84
- ```tsx
85
- <CapRow gutter={16}>
86
- <CapColumn span={12}>Column 1</CapColumn>
87
- <CapColumn span={12}>Column 2</CapColumn>
88
- </CapRow>
89
- ```
90
-
91
- #### `wrap`
92
- - **Type:** `boolean`
93
- - **Default:** `true`
94
- - **Description:** Whether items should wrap to next line when they don't fit
95
- - **Example:**
96
- ```tsx
97
- <CapRow wrap={false}>
98
- {/* Items will not wrap */}
99
- </CapRow>
100
- ```
101
-
102
- ### Size & Spacing Props
103
-
104
- #### `width`
105
- - **Type:** `string | number`
106
- - **Description:** Custom width for the row. If number, treated as pixels
107
- - **Example:**
108
- ```tsx
109
- <CapRow width={500}>Content</CapRow>
110
- <CapRow width="50%">Content</CapRow>
111
- ```
112
-
113
- #### `height`
114
- - **Type:** `string | number`
115
- - **Description:** Custom height for the row. If number, treated as pixels
116
- - **Example:**
117
- ```tsx
118
- <CapRow height={200}>Content</CapRow>
119
- ```
120
-
121
- #### `margin`
122
- - **Type:** `string | number`
123
- - **Description:** Custom margin. If number, treated as pixels
124
- - **Example:**
125
- ```tsx
126
- <CapRow margin={16}>Content</CapRow>
127
- ```
128
-
129
- #### `padding`
130
- - **Type:** `string | number`
131
- - **Description:** Custom padding. If number, treated as pixels
132
- - **Example:**
133
- ```tsx
134
- <CapRow padding={16}>Content</CapRow>
135
- ```
136
-
137
- ### Utility Props
138
-
139
- #### `fullWidth`
140
- - **Type:** `boolean`
141
- - **Default:** `false`
142
- - **Description:** Makes the row take 100% width
143
- - **Example:**
144
- ```tsx
145
- <CapRow fullWidth>Full width content</CapRow>
146
- ```
147
-
148
- #### `fullHeight`
149
- - **Type:** `boolean`
150
- - **Default:** `false`
151
- - **Description:** Makes the row take 100% height
152
- - **Example:**
153
- ```tsx
154
- <CapRow fullHeight>Full height content</CapRow>
155
- ```
156
-
157
- #### `fillSpace`
158
- - **Type:** `boolean`
159
- - **Default:** `false`
160
- - **Description:** Makes the row flex-grow to fill available space (`flex: 1`)
161
- - **Example:**
162
- ```tsx
163
- <CapRow fillSpace>Fills available space</CapRow>
164
- ```
165
-
166
- #### `responsive`
167
- - **Type:** `boolean`
168
- - **Default:** `true`
169
- - **Description:** Whether to use Ant Design's responsive grid system. If `false`, uses flexbox directly
170
- - **Example:**
171
- ```tsx
172
- <CapRow responsive={false}>Non-responsive flex layout</CapRow>
173
- ```
174
-
175
- #### `noWrap`
176
- - **Type:** `boolean`
177
- - **Default:** `false`
178
- - **Description:** Prevents items from wrapping (equivalent to `wrap={false}`)
179
- - **Example:**
180
- ```tsx
181
- <CapRow noWrap>Items won't wrap</CapRow>
182
- ```
183
-
184
- #### `gap`
185
- - **Type:** `number | number[] | string | null`
186
- - **Default:** `null`
187
- - **Description:** CSS gap property for spacing between items. Takes precedence over `gutter`. If `null`, uses `gutter` instead
188
- - **Example:**
189
- ```tsx
190
- <CapRow gap={16}>Items with 16px gap</CapRow>
191
- <CapRow gap={[16, 8]}>16px horizontal, 8px vertical gap</CapRow>
192
- ```
193
-
194
- ### Deprecated Props
195
-
196
- #### `vertical`
197
- - **Type:** `boolean`
198
- - **Default:** `false`
199
- - **Status:** ⚠️ **Deprecated** - Not currently used in implementation
200
- - **Description:** This prop exists in the interface but is not actively used. It may be removed in future versions.
201
-
202
- ## API Changes
203
-
204
- ### Component Import
205
-
206
- **Before:**
207
- ```javascript
208
- import CapRow from '@capillarytech/cap-ui-library/components/CapRow';
209
- ```
210
-
211
- **After:**
212
- ```typescript
213
- import { CapRow } from '@capillarytech/blaze-ui';
214
- // or
215
- import CapRow from '@capillarytech/blaze-ui/components/CapRow';
216
- ```
217
-
218
- ### Type Exports
219
-
220
- **After:**
221
- ```typescript
222
- import type { CapRowProps } from '@capillarytech/blaze-ui';
223
- // or
224
- import type { CapRowProps } from '@capillarytech/blaze-ui/components/CapRow/types';
225
- ```
226
-
227
- ## Behavioral Changes
228
-
229
- ### Children Handling
230
-
231
- **Before:**
232
- - Children were converted to array using `React.Children.toArray(children)`
233
-
234
- **After:**
235
- - Children are passed directly without conversion (Ant Design Row handles this internally)
236
-
237
- ### Styling
238
-
239
- **Before:**
240
- - Simple className application: `"cap-row-v2"`
241
- - No additional styling utilities
242
-
243
- **After:**
244
- - Enhanced className system with conditional classes:
245
- - `with-custom-width` - Applied when `width` prop is set
246
- - `with-custom-height` - Applied when `height` prop is set
247
- - `fill-space` - Applied when `fillSpace` prop is `true`
248
- - `full-width` - Applied when `fullWidth` prop is `true`
249
- - `full-height` - Applied when `fullHeight` prop is `true`
250
- - `ant-row-no-wrap` - Applied when `noWrap` prop is `true`
251
- - `with-gap` - Applied when `gap` prop is set (uses CSS Grid)
252
-
253
- ## Code Examples
254
-
255
- ### Basic Usage
256
-
257
- **Before:**
258
- ```jsx
259
- <CapRow className="my-row">
260
- <div>Item 1</div>
261
- <div>Item 2</div>
262
- </CapRow>
263
- ```
264
-
265
- **After:**
266
- ```tsx
267
- <CapRow className="my-row">
268
- <div>Item 1</div>
269
- <div>Item 2</div>
270
- </CapRow>
271
- ```
272
-
273
- ### With Layout Props
274
-
275
- **New functionality:**
276
- ```tsx
277
- <CapRow
278
- justify="space-between"
279
- align="middle"
280
- gutter={16}
281
- fullWidth
282
- >
283
- <CapColumn span={12}>Left Column</CapColumn>
284
- <CapColumn span={12}>Right Column</CapColumn>
285
- </CapRow>
286
- ```
287
-
288
- ### With Custom Sizing
289
-
290
- ```tsx
291
- <CapRow
292
- width={800}
293
- height={200}
294
- margin={16}
295
- padding={24}
296
- >
297
- Content with custom dimensions
298
- </CapRow>
299
- ```
300
-
301
- ### With Gap (CSS Grid)
302
-
303
- ```tsx
304
- <CapRow gap={16}>
305
- <div>Item 1</div>
306
- <div>Item 2</div>
307
- <div>Item 3</div>
308
- </CapRow>
309
- ```
310
-
311
- ### Fill Available Space
312
-
313
- ```tsx
314
- <div style={{ display: 'flex', height: '100vh' }}>
315
- <CapRow fillSpace>
316
- Takes remaining space
317
- </CapRow>
318
- </div>
319
- ```
320
-
321
- ## Migration Steps for Consumers
322
-
323
- ### Step 1: Update Import
324
-
325
- ```diff
326
- - import CapRow from '@capillarytech/cap-ui-library/components/CapRow';
327
- + import { CapRow } from '@capillarytech/blaze-ui';
328
- ```
329
-
330
- ### Step 2: Add Type Imports (TypeScript)
331
-
332
- ```typescript
333
- import type { CapRowProps } from '@capillarytech/blaze-ui';
334
- ```
335
-
336
- ### Step 3: Utilize New Props (Optional)
337
-
338
- You can now use enhanced layout props:
339
-
340
- ```tsx
341
- // Before: Only className
342
- <CapRow className="my-row">Content</CapRow>
343
-
344
- // After: Enhanced layout control
345
- <CapRow
346
- justify="space-between"
347
- align="middle"
348
- gutter={16}
349
- fullWidth
350
- className="my-row"
351
- >
352
- Content
353
- </CapRow>
354
- ```
355
-
356
- ### Step 4: Update TypeScript Types (if applicable)
357
-
358
- If you have custom TypeScript types extending CapRow props:
359
-
360
- ```typescript
361
- // Before
362
- interface MyRowProps {
363
- customProp: string;
364
- }
365
-
366
- // After
367
- import type { CapRowProps } from '@capillarytech/blaze-ui';
368
-
369
- interface MyRowProps extends CapRowProps {
370
- customProp: string;
371
- }
372
- ```
373
-
374
- ## Breaking Changes
375
-
376
- ### None
377
-
378
- ✅ **No breaking changes from cap-ui-library v8.x**
379
-
380
- The component maintains backward compatibility. All existing usage patterns continue to work. New props are optional and provide enhanced functionality.
381
-
382
- ## File Structure
383
-
384
- ```
385
- blaze-ui/components/CapRow/
386
- ├── index.tsx # Main component file
387
- ├── types.ts # TypeScript interfaces and types
388
- ├── styles.scss # SCSS module styles
389
- ├── tests/
390
- │ └── index.test.tsx # Unit tests
391
- └── README.md # This file
392
- ```
393
-
394
- ## TypeScript Support
395
-
396
- Full TypeScript support is provided:
397
-
398
- ```typescript
399
- import { CapRow } from '@capillarytech/blaze-ui';
400
- import type { CapRowProps } from '@capillarytech/blaze-ui';
401
-
402
- const MyComponent: React.FC = () => {
403
- const rowProps: CapRowProps = {
404
- justify: 'center',
405
- align: 'middle',
406
- gutter: 16,
407
- };
408
-
409
- return <CapRow {...rowProps}>Content</CapRow>;
410
- };
411
- ```
412
-
413
- ## Related Components
414
-
415
- - `CapColumn` - Used together with `CapRow` for grid layouts
416
- - Ant Design `Row` - Base component that `CapRow` wraps
417
-
418
- ## Notes
419
-
420
- - The component uses Ant Design v6's `Row` component internally
421
- - All Ant Design v6 `RowProps` are supported via spread props
422
- - The `gap` prop uses CSS Grid when set, otherwise uses Ant Design's `gutter` system
423
- - The `vertical` prop is deprecated and may be removed in future versions
424
-