@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.
- 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/package.json +1 -1
- package/CapActionBar/README.md +0 -11
- package/CapAdvancedIcon/README.md +0 -185
- package/CapAdvancedIcon/use-cases.md +0 -44
- package/CapAlert/README.md +0 -144
- package/CapAppNotEnabled/README.md +0 -84
- package/CapAskAira/README.md +0 -328
- package/CapBanner/README.md +0 -4
- package/CapBlock/README.md +0 -175
- package/CapBorderedBox/Status.md +0 -40
- package/CapCSVFileUploader/README.md +0 -124
- package/CapCSVFileUploader/Status.md +0 -47
- package/CapCard/README.md +0 -85
- package/CapCard/Status.md +0 -41
- package/CapCardBox/README.md +0 -169
- package/CapCardBox/Status.md +0 -52
- package/CapCarousel/README.md +0 -190
- package/CapCarousel/Status.md +0 -73
- package/CapCheckbox/README.md +0 -254
- package/CapCheckbox/Status.md +0 -41
- package/CapColorPicker/README.md +0 -112
- package/CapColorPicker/Status.md +0 -52
- package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
- package/CapColoredTag/README.md +0 -167
- package/CapColoredTag/Status.md +0 -49
- package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
- package/CapConditionPreview/README.md +0 -40
- package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
- package/CapCustomCard/README.md +0 -182
- package/CapCustomCard/Status.md +0 -40
- package/CapCustomCarousel/Status.md +0 -69
- package/CapCustomCheckboxList/README.md +0 -178
- package/CapCustomCheckboxList/Status.md +0 -52
- package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
- package/CapCustomList/README.md +0 -117
- package/CapCustomList/Status.md +0 -77
- package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
- package/CapCustomSelect/README.md +0 -38
- package/CapDatePicker/README.md +0 -139
- package/CapDateRangePicker/README.md +0 -159
- package/CapDateTimePicker/README.md +0 -136
- package/CapDateTimeRangePicker/README.md +0 -243
- package/CapDivider/README.md +0 -122
- package/CapDrawer/README.md +0 -207
- package/CapDrawer/Status.md +0 -52
- package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
- package/CapDropdown/README.md +0 -515
- package/CapDropdown/Status.md +0 -45
- package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
- package/CapError/README.md +0 -88
- package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
- package/CapErrorBoundary/README.md +0 -150
- package/CapErrorStateIllustration/README.md +0 -222
- package/CapErrorStateIllustration/USE_CASES.md +0 -33
- package/CapExpressionEditor/README.md +0 -32
- package/CapForm/README.md +0 -132
- package/CapForm/Status.md +0 -40
- package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
- package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
- package/CapFormItem/README.md +0 -320
- package/CapFormItem/Status.md +0 -73
- package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
- package/CapGraph/README.md +0 -69
- package/CapGraph/USE_CASES.md +0 -66
- package/CapHamburgerMenu/README.md +0 -234
- package/CapHamburgerMenu/USE_CASES.md +0 -48
- package/CapHeader/Status.md +0 -41
- package/CapHeading/README.md +0 -220
- package/CapHeading/Status.md +0 -41
- package/CapIcon/README.md +0 -207
- package/CapIllustration/Status.md +0 -41
- package/CapImage/README.md +0 -50
- package/CapImportMFEComponent/README.md +0 -121
- package/CapInfoNote/Status.md +0 -40
- package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
- package/CapInput/README.md +0 -196
- package/CapInput/Status.md +0 -123
- package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
- package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
- package/CapLanguageProvider/README.md +0 -206
- package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
- package/CapLevelGraphRenderer/README.md +0 -123
- package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
- package/CapLink/README.md +0 -203
- package/CapLink/Status.md +0 -32
- package/CapLink/tests/CapLink.missingUseCases.md +0 -95
- package/CapList/README.md +0 -129
- package/CapList/Status.md +0 -69
- package/CapListLayout/README.md +0 -7
- package/CapLogin/README.md +0 -7
- package/CapMenu/README.md +0 -86
- package/CapModal/README.md +0 -357
- package/CapModal/Status.md +0 -52
- package/CapModal/tests/USE_CASES_GAPS.md +0 -207
- package/CapMultiSelect/README.md +0 -170
- package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
- package/CapMultiSelectDatePicker/README.md +0 -11
- package/CapNavigation/README.md +0 -72
- package/CapNotification/README.md +0 -228
- package/CapNotificationDropdown/README.md +0 -5
- package/CapPopover/README.md +0 -234
- package/CapProgress/Status.md +0 -40
- package/CapRadio/Status.md +0 -54
- package/CapRadioButton/README.md +0 -152
- package/CapRadioButton/Status.md +0 -70
- package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapRadioCard/README.md +0 -161
- package/CapRadioCard/Status.md +0 -78
- package/CapRadioGroup/README.md +0 -141
- package/CapRadioGroup/Status.md +0 -59
- package/CapReorderComponent/README.md +0 -179
- package/CapReorderComponent/Status.md +0 -41
- package/CapRoadMap/README.md +0 -126
- package/CapRoadMap/Status.md +0 -53
- package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
- package/CapRow/README.md +0 -424
- package/CapSKUUploader/README.md +0 -189
- package/CapSKUUploader/Status.md +0 -66
- package/CapSecondaryTopBar/README.md +0 -7
- package/CapSelect/README.md +0 -243
- package/CapSelectFilter/README.md +0 -121
- package/CapShape/README.md +0 -96
- package/CapShape/Status.md +0 -36
- package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapSideBar/README.md +0 -298
- package/CapSideBar/Status.md +0 -5
- package/CapSlideBox/README.md +0 -68
- package/CapSlider/README.md +0 -423
- package/CapSlider/Status.md +0 -48
- package/CapSlider/tests/TEST_COVERAGE.md +0 -118
- package/CapSnackBar/README.md +0 -222
- package/CapSnackBar/Status.md +0 -41
- package/CapSomethingWentWrong/README.md +0 -97
- package/CapSplit/README.md +0 -19
- package/CapStatisticCard/README.md +0 -138
- package/CapStatus/README.md +0 -148
- package/CapStatus/Status.md +0 -40
- package/CapSteps/Status.md +0 -40
- package/CapStepsAccordian/README.md +0 -305
- package/CapStepsAccordian/Status.md +0 -48
- package/CapSupportVideosWrapper/README.md +0 -14
- package/CapSwitch/README.md +0 -351
- package/CapTab/README.md +0 -406
- package/CapTab/Status.md +0 -104
- package/CapTab/tests/USE_CASE_GAPS.md +0 -143
- package/CapTabV3/ANALYSIS.md +0 -60
- package/CapTabV3/README.md +0 -156
- package/CapTabV3/Status.md +0 -52
- package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
- package/CapTable/README.md +0 -160
- package/CapTable/Status.md +0 -41
- package/CapTag/README.md +0 -16
- package/CapTagDropdown/README.md +0 -171
- package/CapTagDropdown/Status.md +0 -55
- package/CapTimePicker/README.md +0 -170
- package/CapTooltip/README.md +0 -336
- package/CapTooltipWithInfo/Status.md +0 -75
- package/CapTopBar/README.md +0 -146
- package/CapTree/README.md +0 -124
- package/CapTree/Status.md +0 -48
- package/CapTree/tests/STATUS.md +0 -154
- package/CapTreeSelect/README.md +0 -217
- package/CapTreeSelect/Status.md +0 -52
- package/CapTruncateList/README.md +0 -13
- package/CapUnifiedSelect/README.md +0 -40
- package/CapUploader/README.md +0 -313
- package/CapUploader/Status.md +0 -76
- package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
- package/CapUserProfile/README.md +0 -105
- package/CapUserProfile/Status.md +0 -95
- package/CapVirtualList/README.md +0 -162
- package/CapVirtualList/Status.md +0 -71
- package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
package/CapShape/README.md
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# CapShape
|
|
2
|
-
|
|
3
|
-
A simple shape component that renders a circle or square with customizable dimensions, background color, and transform.
|
|
4
|
-
|
|
5
|
-
## Migration Notes (Ant Design v3 → v6)
|
|
6
|
-
|
|
7
|
-
### Summary of Changes
|
|
8
|
-
|
|
9
|
-
This component has been migrated from styled-components to SCSS modules with the following changes:
|
|
10
|
-
|
|
11
|
-
1. **Styled-components → SCSS Modules**: Converted from styled-components to SCSS modules for better maintainability
|
|
12
|
-
2. **TypeScript**: Added full TypeScript support with proper type definitions
|
|
13
|
-
3. **Pixel to Rem Conversion**: Default dimensions converted from `8px` to `0.571rem` (maintaining 8px at base font size)
|
|
14
|
-
4. **Class-based Styling**: Shape variants (circle/square) now use CSS classes instead of dynamic styled-components
|
|
15
|
-
|
|
16
|
-
### Breaking Changes
|
|
17
|
-
|
|
18
|
-
**None** - No breaking changes. The component maintains full backward compatibility with the previous version.
|
|
19
|
-
|
|
20
|
-
### Prop Changes
|
|
21
|
-
|
|
22
|
-
All props remain the same:
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
|------|------|---------|-------------|
|
|
26
|
-
| `width` | `string` | `'0.571rem'` (8px) | Width of the shape |
|
|
27
|
-
| `height` | `string` | `'0.571rem'` (8px) | Height of the shape |
|
|
28
|
-
| `bgColor` | `string` | `'#091e42'` (CAP_G01) | Background color of the shape |
|
|
29
|
-
| `shape` | `'circle' \| 'square'` | `'circle'` | Shape type |
|
|
30
|
-
| `transform` | `string` | `'none'` | CSS transform property |
|
|
31
|
-
| `className` | `string` | `undefined` | Additional CSS class name |
|
|
32
|
-
| `style` | `React.CSSProperties` | `undefined` | Inline styles |
|
|
33
|
-
| All other HTML div attributes | - | - | Passed through to the underlying div element |
|
|
34
|
-
|
|
35
|
-
### CSS/Styling Changes
|
|
36
|
-
|
|
37
|
-
1. **SCSS Modules**: Replaced styled-components with SCSS modules
|
|
38
|
-
2. **Class Naming**: Uses BEM-style naming (`cap-shape`, `cap-shape--circle`, `cap-shape--square`)
|
|
39
|
-
3. **Rem Units**: Default dimensions use rem units (0.571rem = 8px at base font size of 14px)
|
|
40
|
-
4. **Dynamic Styles**: Width, height, background color, and transform are applied via inline styles for flexibility
|
|
41
|
-
|
|
42
|
-
### Usage
|
|
43
|
-
|
|
44
|
-
#### Basic Usage
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
import { CapShape } from '@capillarytech/blaze-ui';
|
|
48
|
-
|
|
49
|
-
// Default circle shape (8px × 8px)
|
|
50
|
-
<CapShape />
|
|
51
|
-
|
|
52
|
-
// Custom size and color
|
|
53
|
-
<CapShape width="1rem" height="1rem" bgColor="#47af46" />
|
|
54
|
-
|
|
55
|
-
// Square shape
|
|
56
|
-
<CapShape shape="square" width="16px" height="16px" />
|
|
57
|
-
|
|
58
|
-
// With transform
|
|
59
|
-
<CapShape transform="rotate(45deg)" />
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### With Custom Styling
|
|
63
|
-
|
|
64
|
-
```tsx
|
|
65
|
-
<CapShape
|
|
66
|
-
width="2rem"
|
|
67
|
-
height="2rem"
|
|
68
|
-
bgColor="#2466ea"
|
|
69
|
-
shape="circle"
|
|
70
|
-
className="my-custom-class"
|
|
71
|
-
style={{ opacity: 0.8 }}
|
|
72
|
-
/>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Migration Example
|
|
76
|
-
|
|
77
|
-
No code changes required! The component API is fully backward compatible:
|
|
78
|
-
|
|
79
|
-
**Before (styled-components)**
|
|
80
|
-
```tsx
|
|
81
|
-
<CapShape width="8px" height="8px" bgColor="#091e42" shape="circle" />
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**After (SCSS modules)**
|
|
85
|
-
```tsx
|
|
86
|
-
<CapShape width="0.571rem" height="0.571rem" bgColor="#091e42" shape="circle" />
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Note**: While the default values now use rem units, you can still pass pixel values and they will work correctly.
|
|
90
|
-
|
|
91
|
-
### Technical Details
|
|
92
|
-
|
|
93
|
-
- **No Ant Design Dependencies**: This component does not use any Ant Design components
|
|
94
|
-
- **Pure HTML Div**: Renders a simple `<div>` element with custom styling
|
|
95
|
-
- **Forward Ref**: Supports ref forwarding for parent component access
|
|
96
|
-
- **TypeScript**: Full TypeScript support with exported `CapShapeProps` interface
|
package/CapShape/Status.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapShape
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-01-31 18:42: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
|
-
- [ ] **Step 9**: CSS Analysis (if mismatches found)
|
|
17
|
-
- [ ] **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-31 18:42:57
|
|
24
|
-
**Maximum Mismatch**: 0%
|
|
25
|
-
|
|
26
|
-
### Mismatched Variants:
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## CSS Fixes Applied
|
|
31
|
-
|
|
32
|
-
_No CSS fixes applied yet._
|
|
33
|
-
|
|
34
|
-
## Notes
|
|
35
|
-
|
|
36
|
-
_No notes yet._
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# CapShape Use Cases Analysis
|
|
2
|
-
|
|
3
|
-
## Component Overview
|
|
4
|
-
CapShape is a simple visual shape component that renders either a circle or square with customizable dimensions, colors, and transforms. It's primarily used as a visual indicator (status dots, badges, etc.).
|
|
5
|
-
|
|
6
|
-
## Phase 1: Use Cases NOT Fulfilled by Component
|
|
7
|
-
|
|
8
|
-
**Note**: Unable to access Google Sheets use cases. Analysis based on component API and common patterns.
|
|
9
|
-
|
|
10
|
-
### 1. **Additional Shape Types**
|
|
11
|
-
- **Status**: ❌ Not Supported
|
|
12
|
-
- **Current Behavior**: Only supports `circle` and `square` shapes
|
|
13
|
-
- **Potential Use Cases**:
|
|
14
|
-
- Triangle shapes for directional indicators
|
|
15
|
-
- Diamond shapes for special markers
|
|
16
|
-
- Custom polygon shapes
|
|
17
|
-
- **Workaround**: Use `transform` prop with `rotate()` to create rotated squares (diamonds)
|
|
18
|
-
|
|
19
|
-
### 2. **Border/Stroke Support**
|
|
20
|
-
- **Status**: ❌ Not Supported
|
|
21
|
-
- **Current Behavior**: Component only supports background color, no border
|
|
22
|
-
- **Potential Use Cases**:
|
|
23
|
-
- Outlined shapes (hollow circles/squares)
|
|
24
|
-
- Bordered shapes with different border colors
|
|
25
|
-
- Stroke width customization
|
|
26
|
-
- **Workaround**: Use `style` prop with `border` CSS property
|
|
27
|
-
|
|
28
|
-
### 3. **Gradient Backgrounds**
|
|
29
|
-
- **Status**: ❌ Not Supported
|
|
30
|
-
- **Current Behavior**: Only supports solid `bgColor`
|
|
31
|
-
- **Potential Use Cases**:
|
|
32
|
-
- Linear gradients
|
|
33
|
-
- Radial gradients
|
|
34
|
-
- Multi-color backgrounds
|
|
35
|
-
- **Workaround**: Use `style` prop with `background` CSS property for gradients
|
|
36
|
-
|
|
37
|
-
### 4. **Preset Size Variants**
|
|
38
|
-
- **Status**: ❌ Not Supported
|
|
39
|
-
- **Current Behavior**: Requires explicit `width` and `height` values
|
|
40
|
-
- **Potential Use Cases**:
|
|
41
|
-
- Small/Medium/Large preset sizes
|
|
42
|
-
- Consistent sizing across application
|
|
43
|
-
- **Workaround**: Define constants or use wrapper components
|
|
44
|
-
|
|
45
|
-
### 5. **Preset Color Schemes**
|
|
46
|
-
- **Status**: ❌ Not Supported
|
|
47
|
-
- **Current Behavior**: Requires explicit color values
|
|
48
|
-
- **Potential Use Cases**:
|
|
49
|
-
- Status colors (success, error, warning, info)
|
|
50
|
-
- Theme-aware colors
|
|
51
|
-
- Semantic color names
|
|
52
|
-
- **Workaround**: Use color constants from `_variables.ts` or wrapper components
|
|
53
|
-
|
|
54
|
-
### 6. **Shadow Effects**
|
|
55
|
-
- **Status**: ❌ Not Supported
|
|
56
|
-
- **Current Behavior**: No built-in shadow support
|
|
57
|
-
- **Potential Use Cases**:
|
|
58
|
-
- Elevation effects
|
|
59
|
-
- Depth indicators
|
|
60
|
-
- Visual hierarchy
|
|
61
|
-
- **Workaround**: Use `style` prop with `boxShadow` CSS property
|
|
62
|
-
|
|
63
|
-
### 7. **Animation Support**
|
|
64
|
-
- **Status**: ⚠️ Limited Support
|
|
65
|
-
- **Current Behavior**: Static shapes, no animation props
|
|
66
|
-
- **Potential Use Cases**:
|
|
67
|
-
- Pulsing animations for status indicators
|
|
68
|
-
- Rotation animations
|
|
69
|
-
- Fade in/out animations
|
|
70
|
-
- **Workaround**: Use `style` prop with CSS animations or external CSS classes
|
|
71
|
-
|
|
72
|
-
### 8. **Aspect Ratio Lock**
|
|
73
|
-
- **Status**: ❌ Not Supported
|
|
74
|
-
- **Current Behavior**: Width and height are independent
|
|
75
|
-
- **Potential Use Cases**:
|
|
76
|
-
- Maintain square aspect ratio automatically
|
|
77
|
-
- Responsive sizing that maintains shape
|
|
78
|
-
- **Workaround**: Use same value for `width` and `height` or wrapper logic
|
|
79
|
-
|
|
80
|
-
### 9. **Opacity/Transparency Control**
|
|
81
|
-
- **Status**: ⚠️ Limited Support
|
|
82
|
-
- **Current Behavior**: No dedicated `opacity` prop
|
|
83
|
-
- **Potential Use Cases**:
|
|
84
|
-
- Disabled/ghost states
|
|
85
|
-
- Overlay effects
|
|
86
|
-
- **Workaround**: Use `style` prop with `opacity` CSS property
|
|
87
|
-
|
|
88
|
-
### 10. **Accessibility Enhancements**
|
|
89
|
-
- **Status**: ⚠️ Partial Support
|
|
90
|
-
- **Current Behavior**: Supports standard HTML attributes but no semantic defaults
|
|
91
|
-
- **Potential Use Cases**:
|
|
92
|
-
- Default `role="presentation"` for decorative shapes
|
|
93
|
-
- Default `aria-hidden="true"` for purely visual indicators
|
|
94
|
-
- Semantic roles for status indicators (`role="status"`)
|
|
95
|
-
- **Workaround**: Manually add ARIA attributes via props
|
|
96
|
-
|
|
97
|
-
## Recommendations
|
|
98
|
-
|
|
99
|
-
### High Priority (if required)
|
|
100
|
-
1. **Preset Size Variants**: Add `size` prop with `small | medium | large` options
|
|
101
|
-
2. **Preset Color Schemes**: Add `variant` prop for status colors (success, error, warning, info)
|
|
102
|
-
3. **Border Support**: Add `border` and `borderColor` props
|
|
103
|
-
|
|
104
|
-
### Medium Priority (if required)
|
|
105
|
-
4. **Additional Shapes**: Add `triangle` and `diamond` shape options
|
|
106
|
-
5. **Animation Support**: Add `animated` prop with animation types
|
|
107
|
-
6. **Default Accessibility**: Set appropriate ARIA attributes by default
|
|
108
|
-
|
|
109
|
-
### Low Priority (nice to have)
|
|
110
|
-
7. **Gradient Support**: Add `gradient` prop
|
|
111
|
-
8. **Shadow Support**: Add `elevation` prop
|
|
112
|
-
9. **Aspect Ratio Lock**: Add `aspectRatio` prop
|
|
113
|
-
|
|
114
|
-
## Current Component Strengths
|
|
115
|
-
✅ Simple, focused API
|
|
116
|
-
✅ Full control over dimensions and colors
|
|
117
|
-
✅ Supports all HTML div attributes
|
|
118
|
-
✅ Ref forwarding support
|
|
119
|
-
✅ Transform support for rotations/scaling
|
|
120
|
-
✅ Flexible styling via className and style props
|
package/CapSideBar/README.md
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
# CapSideBar
|
|
2
|
-
|
|
3
|
-
A sidebar navigation component with collapsible menu items and optional search functionality.
|
|
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
|
-
### Summary of Changes
|
|
10
|
-
|
|
11
|
-
- **TypeScript Migration**: Converted from JavaScript to TypeScript with proper type definitions
|
|
12
|
-
- **Ant Design v6 Compatibility**: Updated to use Ant Design v6 APIs
|
|
13
|
-
- **SCSS Modules**: Uses SCSS modules for styling
|
|
14
|
-
- **Class Component**: Maintained as class component (no functional conversion)
|
|
15
|
-
|
|
16
|
-
## Props
|
|
17
|
-
|
|
18
|
-
| Prop | Type | Default | Description |
|
|
19
|
-
|------|------|---------|-------------|
|
|
20
|
-
| `sidebarItems` | `SidebarItem[]` | - | Array of sidebar menu items |
|
|
21
|
-
| `defaultActiveKey` | `string` | - | Default active key for the collapse component |
|
|
22
|
-
| `selectedMenuItem` | `string` | - | Currently selected menu item key |
|
|
23
|
-
| `searchData` | `SidebarItem[]` | - | Search data array |
|
|
24
|
-
| `handleSearch` | `(searchText: string) => void` | - | Handler function for search |
|
|
25
|
-
| `searchSupportPortalUrl` | `string` | - | Support portal URL for search |
|
|
26
|
-
| `onLinkClick` | `(item: SidebarItem) => void` | - | Handler function for link clicks |
|
|
27
|
-
| `pageHeading` | `string` | - | Page heading text |
|
|
28
|
-
| `showSearchbar` | `boolean` | - | Whether to show the search bar |
|
|
29
|
-
|
|
30
|
-
### SidebarItem Interface
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
interface SidebarItem {
|
|
34
|
-
title: string;
|
|
35
|
-
key: string;
|
|
36
|
-
link?: string;
|
|
37
|
-
children?: SidebarItem[];
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Breaking Changes
|
|
42
|
-
|
|
43
|
-
**No breaking changes** - The component maintains backward compatibility with the previous version.
|
|
44
|
-
|
|
45
|
-
## Deprecated Props
|
|
46
|
-
|
|
47
|
-
**Status:** ✅ **No deprecated props currently in use**
|
|
48
|
-
|
|
49
|
-
All Ant Design component APIs have been updated to use current APIs. The component does not use any deprecated Ant Design props.
|
|
50
|
-
|
|
51
|
-
The following Ant Design component API migrations were completed during the migration from cap-ui-library. These deprecated APIs are no longer used:
|
|
52
|
-
|
|
53
|
-
### Summary Table
|
|
54
|
-
|
|
55
|
-
| Ant Design Component | Deprecated API | New API | Status | Location |
|
|
56
|
-
|---------------------|----------------|---------|--------|----------|
|
|
57
|
-
| **Icon** | `<Icon type="..." />` | Individual icon imports | ✅ Migrated | `expandIcon` prop |
|
|
58
|
-
| **Popover** | `visible`, `onVisibleChange` | `open`, `onOpenChange` | ✅ Migrated | MenuSearch subcomponent |
|
|
59
|
-
| **Popover** | `overlayClassName` | `classNames.root` | ✅ Migrated | MenuSearch subcomponent |
|
|
60
|
-
| **Collapse** | - | - | ✅ Current | All props current |
|
|
61
|
-
|
|
62
|
-
### `<Icon type="..." />` API (Ant Design Icon Component)
|
|
63
|
-
|
|
64
|
-
- **Status:** ✅ Migrated (no longer in use)
|
|
65
|
-
- **Ant Design Component:** Icon
|
|
66
|
-
- **Deprecated API:** `<Icon type="caret-right" />` from `antd` (Ant Design v3 API)
|
|
67
|
-
- **Replacement:** Individual icon imports from `@ant-design-v5/icons`
|
|
68
|
-
- **Location:** Used internally in `expandIcon` prop for Collapse component
|
|
69
|
-
- **Migration:** Replace `<Icon type="..." />` with individual icon component imports
|
|
70
|
-
|
|
71
|
-
**Before (Deprecated - cap-ui-library):**
|
|
72
|
-
|
|
73
|
-
```tsx
|
|
74
|
-
import { Icon, Collapse } from 'antd';
|
|
75
|
-
|
|
76
|
-
<Collapse
|
|
77
|
-
expandIcon={({ isActive }) => <Icon type="caret-right" rotate={isActive ? 90 : 0} />}
|
|
78
|
-
/>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**After (Current - blaze-ui):**
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { CaretRightOutlined } from '@ant-design-v5/icons';
|
|
85
|
-
import { Collapse } from 'antd-v5';
|
|
86
|
-
|
|
87
|
-
<Collapse
|
|
88
|
-
expandIcon={({ isActive }) => <CaretRightOutlined rotate={isActive ? 90 : 0} />}
|
|
89
|
-
/>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
**Note:** The deprecated `<Icon type="..." />` API was replaced with individual icon imports. This migration is complete and no deprecated Icon APIs are used.
|
|
93
|
-
|
|
94
|
-
### `visible` and `onVisibleChange` Props (Ant Design Popover Component)
|
|
95
|
-
|
|
96
|
-
- **Status:** ✅ Migrated (no longer in use)
|
|
97
|
-
- **Ant Design Component:** Popover
|
|
98
|
-
- **Deprecated Props:** `visible`, `onVisibleChange`
|
|
99
|
-
- **Replacement:** `open`, `onOpenChange`
|
|
100
|
-
- **Location:** Used internally in `MenuSearch` component
|
|
101
|
-
- **Migration:** Replace `visible` with `open` and `onVisibleChange` with `onOpenChange`
|
|
102
|
-
|
|
103
|
-
**Before (Deprecated - Ant Design v5):**
|
|
104
|
-
|
|
105
|
-
```tsx
|
|
106
|
-
<Popover
|
|
107
|
-
visible={open}
|
|
108
|
-
onVisibleChange={handleVisibleChange}
|
|
109
|
-
...
|
|
110
|
-
/>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**After (Current - Ant Design v6 API):**
|
|
114
|
-
|
|
115
|
-
```tsx
|
|
116
|
-
<Popover
|
|
117
|
-
open={open}
|
|
118
|
-
onOpenChange={handleOpenChange}
|
|
119
|
-
...
|
|
120
|
-
/>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Note:** Popover component uses current Ant Design v6 APIs. No deprecated props are used.
|
|
124
|
-
|
|
125
|
-
### `overlayClassName` Prop (Ant Design Popover Component)
|
|
126
|
-
|
|
127
|
-
- **Status:** ✅ Migrated (no longer in use)
|
|
128
|
-
- **Ant Design Component:** Popover
|
|
129
|
-
- **Deprecated Prop:** `overlayClassName`
|
|
130
|
-
- **Replacement:** `classNames.root`
|
|
131
|
-
- **Location:** Used internally in `MenuSearch` component
|
|
132
|
-
- **Migration:** Replace `overlayClassName` with `classNames={{ root: ... }}`
|
|
133
|
-
|
|
134
|
-
**Before (Deprecated - Ant Design v5):**
|
|
135
|
-
|
|
136
|
-
```tsx
|
|
137
|
-
<Popover
|
|
138
|
-
overlayClassName="custom-popover"
|
|
139
|
-
...
|
|
140
|
-
/>
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
**After (Current - Ant Design v6 API):**
|
|
144
|
-
|
|
145
|
-
```tsx
|
|
146
|
-
<Popover
|
|
147
|
-
classNames={{ root: "custom-popover" }}
|
|
148
|
-
...
|
|
149
|
-
/>
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
**Note:** Popover component uses current Ant Design v6 APIs. No deprecated props are used.
|
|
153
|
-
|
|
154
|
-
### Collapse Component (Ant Design)
|
|
155
|
-
|
|
156
|
-
- **Status:** ✅ Current APIs (no deprecated props)
|
|
157
|
-
- **Ant Design Component:** Collapse
|
|
158
|
-
- **Props Used:** `defaultActiveKey`, `className`, `bordered`, `accordion`, `expandIcon`
|
|
159
|
-
- **Status:** All props are current and not deprecated in Ant Design v6
|
|
160
|
-
|
|
161
|
-
**Note:** The `bordered` prop is still valid in Ant Design v6 and is not deprecated.
|
|
162
|
-
|
|
163
|
-
## Usage Examples
|
|
164
|
-
|
|
165
|
-
### Basic Usage
|
|
166
|
-
|
|
167
|
-
```tsx
|
|
168
|
-
import CapSideBar from '@capillarytech/blaze-ui/components/CapSideBar';
|
|
169
|
-
|
|
170
|
-
const sidebarItems = [
|
|
171
|
-
{
|
|
172
|
-
title: 'Dashboard',
|
|
173
|
-
key: 'dashboard',
|
|
174
|
-
link: '/dashboard',
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
title: 'Settings',
|
|
178
|
-
key: 'settings',
|
|
179
|
-
children: [
|
|
180
|
-
{
|
|
181
|
-
title: 'General',
|
|
182
|
-
key: 'general',
|
|
183
|
-
link: '/settings/general',
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
title: 'Advanced',
|
|
187
|
-
key: 'advanced',
|
|
188
|
-
link: '/settings/advanced',
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
];
|
|
193
|
-
|
|
194
|
-
<CapSideBar
|
|
195
|
-
sidebarItems={sidebarItems}
|
|
196
|
-
defaultActiveKey="dashboard"
|
|
197
|
-
selectedMenuItem="dashboard"
|
|
198
|
-
/>
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### With Search
|
|
202
|
-
|
|
203
|
-
```tsx
|
|
204
|
-
<CapSideBar
|
|
205
|
-
sidebarItems={sidebarItems}
|
|
206
|
-
showSearchbar
|
|
207
|
-
handleSearch={(searchText) => {
|
|
208
|
-
console.log('Searching for:', searchText);
|
|
209
|
-
}}
|
|
210
|
-
searchSupportPortalUrl="https://support.example.com/search?q={{searchText}}"
|
|
211
|
-
/>
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
### With Page Heading
|
|
215
|
-
|
|
216
|
-
```tsx
|
|
217
|
-
<CapSideBar
|
|
218
|
-
sidebarItems={sidebarItems}
|
|
219
|
-
pageHeading="Navigation"
|
|
220
|
-
selectedMenuItem="dashboard"
|
|
221
|
-
/>
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### With Link Click Handler
|
|
225
|
-
|
|
226
|
-
```tsx
|
|
227
|
-
<CapSideBar
|
|
228
|
-
sidebarItems={sidebarItems}
|
|
229
|
-
onLinkClick={(item) => {
|
|
230
|
-
console.log('Link clicked:', item);
|
|
231
|
-
// Handle navigation programmatically
|
|
232
|
-
}}
|
|
233
|
-
/>
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## API Changes
|
|
237
|
-
|
|
238
|
-
### TypeScript Support
|
|
239
|
-
|
|
240
|
-
- **Full TypeScript Support:** All props are typed with TypeScript interfaces
|
|
241
|
-
- **Exported Types:** `CapSideBarProps` and `SidebarItem` interfaces are exported from `types.ts`
|
|
242
|
-
|
|
243
|
-
### Ant Design Version
|
|
244
|
-
|
|
245
|
-
- **Ant Design Version:** Currently using `antd-v5` (Ant Design v5)
|
|
246
|
-
- **Status:** All Ant Design component APIs used are current and not deprecated
|
|
247
|
-
- **Icon Migration:** Successfully migrated from deprecated `<Icon type="..." />` API to individual icon imports
|
|
248
|
-
- **Popover API:** Using Ant Design v6-compatible APIs (`open`, `onOpenChange`, `classNames.root`)
|
|
249
|
-
- **Future Updates:** Component will be upgraded to use `antd` (v6) in a future release
|
|
250
|
-
|
|
251
|
-
## Behavioral Changes
|
|
252
|
-
|
|
253
|
-
1. **Search Functionality:** Search is debounced by 200ms for better performance
|
|
254
|
-
2. **Nested Menus:** Supports unlimited nesting levels of menu items
|
|
255
|
-
3. **Active State:** Visual indication of selected menu item via `selectedMenuItem` prop
|
|
256
|
-
|
|
257
|
-
## Migration Steps for Consumers
|
|
258
|
-
|
|
259
|
-
No migration steps required. The component maintains full backward compatibility with cap-ui-library v8.x.
|
|
260
|
-
|
|
261
|
-
If you want to take advantage of new features:
|
|
262
|
-
|
|
263
|
-
1. **Use TypeScript types**: Import `CapSideBarProps` and `SidebarItem` for type safety
|
|
264
|
-
2. **Use search functionality**: Enable `showSearchbar` prop and provide `handleSearch` handler
|
|
265
|
-
3. **Use link click handler**: Provide `onLinkClick` for programmatic navigation
|
|
266
|
-
|
|
267
|
-
## Code Examples
|
|
268
|
-
|
|
269
|
-
### Before (cap-ui-library)
|
|
270
|
-
|
|
271
|
-
```jsx
|
|
272
|
-
import CapSideBar from '@capillarytech/cap-ui-library/components/CapSideBar';
|
|
273
|
-
|
|
274
|
-
<CapSideBar
|
|
275
|
-
sidebarItems={sidebarItems}
|
|
276
|
-
defaultActiveKey="dashboard"
|
|
277
|
-
selectedMenuItem="dashboard"
|
|
278
|
-
/>
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### After (blaze-ui)
|
|
282
|
-
|
|
283
|
-
```tsx
|
|
284
|
-
import CapSideBar from '@capillarytech/blaze-ui/components/CapSideBar';
|
|
285
|
-
import type { CapSideBarProps, SidebarItem } from '@capillarytech/blaze-ui/components/CapSideBar/types';
|
|
286
|
-
|
|
287
|
-
<CapSideBar
|
|
288
|
-
sidebarItems={sidebarItems}
|
|
289
|
-
defaultActiveKey="dashboard"
|
|
290
|
-
selectedMenuItem="dashboard"
|
|
291
|
-
/>
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
## Related Components
|
|
295
|
-
|
|
296
|
-
- `CapHeading` - Used for page heading and menu item titles
|
|
297
|
-
- `MenuSearch` - Subcomponent for search functionality
|
|
298
|
-
- `Collapse` (Ant Design) - Used for collapsible menu structure
|
package/CapSlideBox/README.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# CapSlideBox
|
|
2
|
-
|
|
3
|
-
A slide-out panel component for displaying content in a side drawer.
|
|
4
|
-
|
|
5
|
-
## Migration from cap-ui-library to blaze-ui
|
|
6
|
-
|
|
7
|
-
### Summary of Changes
|
|
8
|
-
|
|
9
|
-
- ✅ **TypeScript conversion**: Converted from JavaScript to TypeScript with proper type definitions
|
|
10
|
-
- ✅ **Functional component**: Converted from class component to functional component using React hooks
|
|
11
|
-
- ✅ **SCSS modules**: Migrated styles to SCSS modules with proper namespacing
|
|
12
|
-
- ✅ **Pixel to rem conversion**: All pixel values converted to rem units (14px = 1rem)
|
|
13
|
-
- ✅ **SCSS variables**: Using design system variables from `components/styled/variables.scss`
|
|
14
|
-
|
|
15
|
-
### Breaking Changes
|
|
16
|
-
|
|
17
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
18
|
-
|
|
19
|
-
The component API remains fully backward compatible. All props work exactly the same as before.
|
|
20
|
-
|
|
21
|
-
### Props
|
|
22
|
-
|
|
23
|
-
| Prop | Type | Default | Description |
|
|
24
|
-
|------|------|---------|-------------|
|
|
25
|
-
| `header` | `ReactNode` | required | Header content (string or React element) |
|
|
26
|
-
| `content` | `ReactNode` | required | Main content to display in the slide box |
|
|
27
|
-
| `handleClose` | `() => void` | required | Callback function when close icon is clicked |
|
|
28
|
-
| `show` | `boolean` | `undefined` | Controls visibility of the slide box |
|
|
29
|
-
| `footer` | `ReactNode` | `undefined` | Optional footer content |
|
|
30
|
-
| `size` | `'size-s' \| 'size-r' \| 'size-l' \| 'size-xl'` | `'size-r'` | Size variant of the slide box |
|
|
31
|
-
| `position` | `'left' \| 'right'` | `'right'` | Position of the slide box |
|
|
32
|
-
| `className` | `string` | `undefined` | Additional CSS class names |
|
|
33
|
-
| `closeIconSize` | `'xs' \| 's' \| 'm' \| 'l'` | `'m'` | Size of the close icon |
|
|
34
|
-
| `closeIconPosition` | `'left' \| 'right'` | `'right'` | Position of the close icon in header |
|
|
35
|
-
| `closeIconType` | `'close' \| 'back'` | `'close'` | Type of close icon to display |
|
|
36
|
-
|
|
37
|
-
### Size Variants
|
|
38
|
-
|
|
39
|
-
- **size-s**: Small (25vw width, min: 372px, max: 400px)
|
|
40
|
-
- **size-r**: Regular (50vw width, min: 660px, max: 800px) - Default
|
|
41
|
-
- **size-l**: Large (75vw width, min: 948px, max: 1140px)
|
|
42
|
-
- **size-xl**: Extra Large (fixed: 1180px)
|
|
43
|
-
|
|
44
|
-
### Features
|
|
45
|
-
|
|
46
|
-
- **Automatic scroll shadow**: Shows shadow on header/footer when content is scrolled
|
|
47
|
-
- **Body scroll lock**: Prevents body scrolling when slide box is open
|
|
48
|
-
- **Responsive sizes**: Adapts to viewport width with min/max constraints
|
|
49
|
-
- **Flexible positioning**: Can slide from left or right
|
|
50
|
-
- **Custom header layout**: Close icon can be positioned on left or right
|
|
51
|
-
- **Footer support**: Optional fixed footer at bottom
|
|
52
|
-
- **Throttled scroll**: Optimized scroll event handling
|
|
53
|
-
|
|
54
|
-
### Migration Guide for Consumers
|
|
55
|
-
|
|
56
|
-
No migration required! The component API is fully backward compatible. If you're already using `CapSlideBox` from cap-ui-library, you can simply update your imports to point to blaze-ui:
|
|
57
|
-
|
|
58
|
-
**Before:**
|
|
59
|
-
```tsx
|
|
60
|
-
import CapSlideBox from '@capillarytech/cap-ui-library/components/CapSlideBox';
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**After:**
|
|
64
|
-
```tsx
|
|
65
|
-
import CapSlideBox from '@capillarytech/blaze-ui/components/CapSlideBox';
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
All your existing props and usage patterns will continue to work without any changes.
|