@capillarytech/blaze-ui 5.20.0 → 5.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapAskAira/CapAiMediaGeneration/saga.js +1446 -0
- package/CapAskAira/CapAiMediaGeneration/saga.js.map +1 -0
- package/CapCollapsibleLeftNavigation/saga.js +1441 -0
- package/CapCollapsibleLeftNavigation/saga.js.map +1 -0
- package/CapLanguageProvider/actions.js +125 -0
- package/CapLanguageProvider/actions.js.map +1 -0
- package/CapLanguageProvider/constants.js +37 -0
- package/CapLanguageProvider/constants.js.map +1 -0
- package/CapLanguageProvider/reducer.js +130 -0
- package/CapLanguageProvider/reducer.js.map +1 -0
- package/CapLanguageProvider/saga.js +1457 -0
- package/CapLanguageProvider/saga.js.map +1 -0
- package/CapLanguageProvider/selector.js +186 -0
- package/CapLanguageProvider/selector.js.map +1 -0
- package/CapSupportVideosWrapper/utils.js +34 -0
- package/CapSupportVideosWrapper/utils.js.map +1 -0
- package/package.json +1 -1
- package/CapActionBar/README.md +0 -11
- package/CapAdvancedIcon/README.md +0 -185
- package/CapAdvancedIcon/use-cases.md +0 -44
- package/CapAlert/README.md +0 -144
- package/CapAppNotEnabled/README.md +0 -84
- package/CapAskAira/README.md +0 -328
- package/CapBanner/README.md +0 -4
- package/CapBlock/README.md +0 -175
- package/CapBorderedBox/Status.md +0 -40
- package/CapCSVFileUploader/README.md +0 -124
- package/CapCSVFileUploader/Status.md +0 -47
- package/CapCard/README.md +0 -85
- package/CapCard/Status.md +0 -41
- package/CapCardBox/README.md +0 -169
- package/CapCardBox/Status.md +0 -52
- package/CapCarousel/README.md +0 -190
- package/CapCarousel/Status.md +0 -73
- package/CapCheckbox/README.md +0 -254
- package/CapCheckbox/Status.md +0 -41
- package/CapColorPicker/README.md +0 -112
- package/CapColorPicker/Status.md +0 -52
- package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
- package/CapColoredTag/README.md +0 -167
- package/CapColoredTag/Status.md +0 -49
- package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
- package/CapConditionPreview/README.md +0 -40
- package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
- package/CapCustomCard/README.md +0 -182
- package/CapCustomCard/Status.md +0 -40
- package/CapCustomCarousel/Status.md +0 -69
- package/CapCustomCheckboxList/README.md +0 -178
- package/CapCustomCheckboxList/Status.md +0 -52
- package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
- package/CapCustomList/README.md +0 -117
- package/CapCustomList/Status.md +0 -77
- package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
- package/CapCustomSelect/README.md +0 -38
- package/CapDatePicker/README.md +0 -139
- package/CapDateRangePicker/README.md +0 -159
- package/CapDateTimePicker/README.md +0 -136
- package/CapDateTimeRangePicker/README.md +0 -243
- package/CapDivider/README.md +0 -122
- package/CapDrawer/README.md +0 -207
- package/CapDrawer/Status.md +0 -52
- package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
- package/CapDropdown/README.md +0 -515
- package/CapDropdown/Status.md +0 -45
- package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
- package/CapError/README.md +0 -88
- package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
- package/CapErrorBoundary/README.md +0 -150
- package/CapErrorStateIllustration/README.md +0 -222
- package/CapErrorStateIllustration/USE_CASES.md +0 -33
- package/CapExpressionEditor/README.md +0 -32
- package/CapForm/README.md +0 -132
- package/CapForm/Status.md +0 -40
- package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
- package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
- package/CapFormItem/README.md +0 -320
- package/CapFormItem/Status.md +0 -73
- package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
- package/CapGraph/README.md +0 -69
- package/CapGraph/USE_CASES.md +0 -66
- package/CapHamburgerMenu/README.md +0 -234
- package/CapHamburgerMenu/USE_CASES.md +0 -48
- package/CapHeader/Status.md +0 -41
- package/CapHeading/README.md +0 -220
- package/CapHeading/Status.md +0 -41
- package/CapIcon/README.md +0 -207
- package/CapIllustration/Status.md +0 -41
- package/CapImage/README.md +0 -50
- package/CapImportMFEComponent/README.md +0 -121
- package/CapInfoNote/Status.md +0 -40
- package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
- package/CapInput/README.md +0 -196
- package/CapInput/Status.md +0 -123
- package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
- package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
- package/CapLanguageProvider/README.md +0 -206
- package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
- package/CapLevelGraphRenderer/README.md +0 -123
- package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
- package/CapLink/README.md +0 -203
- package/CapLink/Status.md +0 -32
- package/CapLink/tests/CapLink.missingUseCases.md +0 -95
- package/CapList/README.md +0 -129
- package/CapList/Status.md +0 -69
- package/CapListLayout/README.md +0 -7
- package/CapLogin/README.md +0 -7
- package/CapMenu/README.md +0 -86
- package/CapModal/README.md +0 -357
- package/CapModal/Status.md +0 -52
- package/CapModal/tests/USE_CASES_GAPS.md +0 -207
- package/CapMultiSelect/README.md +0 -170
- package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
- package/CapMultiSelectDatePicker/README.md +0 -11
- package/CapNavigation/README.md +0 -72
- package/CapNotification/README.md +0 -228
- package/CapNotificationDropdown/README.md +0 -5
- package/CapPopover/README.md +0 -234
- package/CapProgress/Status.md +0 -40
- package/CapRadio/Status.md +0 -54
- package/CapRadioButton/README.md +0 -152
- package/CapRadioButton/Status.md +0 -70
- package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapRadioCard/README.md +0 -161
- package/CapRadioCard/Status.md +0 -78
- package/CapRadioGroup/README.md +0 -141
- package/CapRadioGroup/Status.md +0 -59
- package/CapReorderComponent/README.md +0 -179
- package/CapReorderComponent/Status.md +0 -41
- package/CapRoadMap/README.md +0 -126
- package/CapRoadMap/Status.md +0 -53
- package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
- package/CapRow/README.md +0 -424
- package/CapSKUUploader/README.md +0 -189
- package/CapSKUUploader/Status.md +0 -66
- package/CapSecondaryTopBar/README.md +0 -7
- package/CapSelect/README.md +0 -243
- package/CapSelectFilter/README.md +0 -121
- package/CapShape/README.md +0 -96
- package/CapShape/Status.md +0 -36
- package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapSideBar/README.md +0 -298
- package/CapSideBar/Status.md +0 -5
- package/CapSlideBox/README.md +0 -68
- package/CapSlider/README.md +0 -423
- package/CapSlider/Status.md +0 -48
- package/CapSlider/tests/TEST_COVERAGE.md +0 -118
- package/CapSnackBar/README.md +0 -222
- package/CapSnackBar/Status.md +0 -41
- package/CapSomethingWentWrong/README.md +0 -97
- package/CapSplit/README.md +0 -19
- package/CapStatisticCard/README.md +0 -138
- package/CapStatus/README.md +0 -148
- package/CapStatus/Status.md +0 -40
- package/CapSteps/Status.md +0 -40
- package/CapStepsAccordian/README.md +0 -305
- package/CapStepsAccordian/Status.md +0 -48
- package/CapSupportVideosWrapper/README.md +0 -14
- package/CapSwitch/README.md +0 -351
- package/CapTab/README.md +0 -406
- package/CapTab/Status.md +0 -104
- package/CapTab/tests/USE_CASE_GAPS.md +0 -143
- package/CapTabV3/ANALYSIS.md +0 -60
- package/CapTabV3/README.md +0 -156
- package/CapTabV3/Status.md +0 -52
- package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
- package/CapTable/README.md +0 -160
- package/CapTable/Status.md +0 -41
- package/CapTag/README.md +0 -16
- package/CapTagDropdown/README.md +0 -171
- package/CapTagDropdown/Status.md +0 -55
- package/CapTimePicker/README.md +0 -170
- package/CapTooltip/README.md +0 -336
- package/CapTooltipWithInfo/Status.md +0 -75
- package/CapTopBar/README.md +0 -146
- package/CapTree/README.md +0 -124
- package/CapTree/Status.md +0 -48
- package/CapTree/tests/STATUS.md +0 -154
- package/CapTreeSelect/README.md +0 -217
- package/CapTreeSelect/Status.md +0 -52
- package/CapTruncateList/README.md +0 -13
- package/CapUnifiedSelect/README.md +0 -40
- package/CapUploader/README.md +0 -313
- package/CapUploader/Status.md +0 -76
- package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
- package/CapUserProfile/README.md +0 -105
- package/CapUserProfile/Status.md +0 -95
- package/CapVirtualList/README.md +0 -162
- package/CapVirtualList/Status.md +0 -71
- package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
package/CapDrawer/README.md
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
# CapDrawer
|
|
2
|
-
|
|
3
|
-
A wrapper component around Ant Design's Drawer component that provides consistent styling and a simplified API for displaying drawer panels in Capillary applications.
|
|
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. Ant Design Drawer Component API Changes
|
|
12
|
-
|
|
13
|
-
The following Ant Design `Drawer` component props have been deprecated in v6:
|
|
14
|
-
|
|
15
|
-
| Ant Design Component | Deprecated Prop (v3/v5) | New Prop (v6) | Status | Migration Guide |
|
|
16
|
-
|---------------------|-------------------------|---------------|--------|-----------------|
|
|
17
|
-
| **Drawer** | `visible` | `open` | ⚠️ Deprecated | Replace `visible={...}` with `open={...}`. Backward compatibility maintained. |
|
|
18
|
-
| **Drawer** | `onVisibleChange` | `onOpenChange` | ⚠️ Deprecated | Replace `onVisibleChange={...}` with `onOpenChange={...}`. Backward compatibility maintained. |
|
|
19
|
-
|
|
20
|
-
**Example:**
|
|
21
|
-
```tsx
|
|
22
|
-
// ❌ Deprecated (still works with warning)
|
|
23
|
-
<CapDrawer visible={isOpen} onVisibleChange={setIsOpen} />
|
|
24
|
-
|
|
25
|
-
// ✅ Recommended
|
|
26
|
-
<CapDrawer open={isOpen} onOpenChange={setIsOpen} />
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Backward Compatibility
|
|
30
|
-
|
|
31
|
-
The component maintains backward compatibility for deprecated Ant Design Drawer props:
|
|
32
|
-
|
|
33
|
-
- **`visible` prop** (Ant Design Drawer): Still works but logs a deprecation warning in development. Use `open` instead.
|
|
34
|
-
- **`onVisibleChange` prop** (Ant Design Drawer): Still works but logs a deprecation warning in development. Use `onOpenChange` instead.
|
|
35
|
-
|
|
36
|
-
### Style Changes
|
|
37
|
-
|
|
38
|
-
**Approach**: The component uses Ant Design v6's Drawer component which applies styling through theme tokens. No custom SCSS overrides are needed for the drawer itself.
|
|
39
|
-
|
|
40
|
-
**Note**: Consumer components like `CapTopBar` and `CapHamburgerMenu` may have their own drawer styling overrides, but these are handled within those components' stylesheets.
|
|
41
|
-
|
|
42
|
-
### Code Improvements
|
|
43
|
-
|
|
44
|
-
1. **TypeScript support**: Full TypeScript definitions with proper prop types
|
|
45
|
-
2. **Using deprecation warning utility**: Now uses `logDeprecationWarning` utility for consistent deprecation warnings
|
|
46
|
-
3. **Improved backward compatibility**: Deprecated props are mapped using nullish coalescing (`??`) for cleaner code
|
|
47
|
-
4. **Modern React patterns**: Uses functional component with React.FC
|
|
48
|
-
|
|
49
|
-
### What Stayed the Same
|
|
50
|
-
|
|
51
|
-
- Custom `content` prop (maps to children)
|
|
52
|
-
- Custom `size` prop for width presets (`'s'`, `'r'`, `'l'`)
|
|
53
|
-
- Custom `width` prop for explicit width values
|
|
54
|
-
- All other Ant Design Drawer props pass through unchanged
|
|
55
|
-
|
|
56
|
-
### What Changed
|
|
57
|
-
|
|
58
|
-
- **Removed**: PropTypes (replaced with TypeScript)
|
|
59
|
-
- **Updated**: Import from `antd` to `antd-v5`
|
|
60
|
-
- **Added**: TypeScript type definitions in `types.ts`
|
|
61
|
-
- **Added**: Deprecation warnings for `visible` and `onVisibleChange` props
|
|
62
|
-
|
|
63
|
-
## Props
|
|
64
|
-
|
|
65
|
-
### Standard Props
|
|
66
|
-
|
|
67
|
-
All standard Ant Design Drawer props are supported. Refer to [Ant Design Drawer documentation](https://ant.design/components/drawer) for complete API reference.
|
|
68
|
-
|
|
69
|
-
### Custom Props
|
|
70
|
-
|
|
71
|
-
| Prop | Type | Default | Description |
|
|
72
|
-
|------|------|---------|-------------|
|
|
73
|
-
| `content` | `ReactNode` | - | Content to display inside the drawer (maps to children) |
|
|
74
|
-
| `width` | `number \| string` | `256` | Width of the drawer in pixels or CSS units |
|
|
75
|
-
| `size` | `'s' \| 'r' \| 'l'` | - | Size preset: 's' = 25vw, 'r' = 50vw, 'l' = 75vw |
|
|
76
|
-
| `open` | `boolean` | - | Controlled open state |
|
|
77
|
-
| `defaultOpen` | `boolean` | `false` | Default open state (uncontrolled) |
|
|
78
|
-
| `onOpenChange` | `(open: boolean) => void` | - | Callback when open state changes |
|
|
79
|
-
|
|
80
|
-
### Deprecated Props
|
|
81
|
-
|
|
82
|
-
The following props are deprecated but still supported for backward compatibility. They will show console warnings in development mode and will be removed in v10.0.0.
|
|
83
|
-
|
|
84
|
-
#### Ant Design Drawer Component Props
|
|
85
|
-
|
|
86
|
-
| Deprecated Prop | Ant Design Component | Replacement | Migration Example |
|
|
87
|
-
|----------------|---------------------|-------------|-------------------|
|
|
88
|
-
| `visible` | **Drawer** | `open` | See example below |
|
|
89
|
-
| `onVisibleChange` | **Drawer** | `onOpenChange` | See example below |
|
|
90
|
-
|
|
91
|
-
**Migration Example:**
|
|
92
|
-
```tsx
|
|
93
|
-
// Before (deprecated)
|
|
94
|
-
<CapDrawer
|
|
95
|
-
visible={isOpen}
|
|
96
|
-
onVisibleChange={setIsOpen}
|
|
97
|
-
title="Drawer"
|
|
98
|
-
content={<div>Content</div>}
|
|
99
|
-
/>
|
|
100
|
-
|
|
101
|
-
// After (recommended)
|
|
102
|
-
<CapDrawer
|
|
103
|
-
open={isOpen}
|
|
104
|
-
onOpenChange={setIsOpen}
|
|
105
|
-
title="Drawer"
|
|
106
|
-
content={<div>Content</div>}
|
|
107
|
-
/>
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Note:** The deprecated `visible` and `onVisibleChange` props are automatically mapped to `open` and `onOpenChange` internally. However, you should migrate to the new API to avoid future breaking changes.
|
|
111
|
-
|
|
112
|
-
## Examples
|
|
113
|
-
|
|
114
|
-
### Basic Usage
|
|
115
|
-
|
|
116
|
-
```tsx
|
|
117
|
-
import { CapDrawer, CapButton } from '@capillarytech/blaze-ui';
|
|
118
|
-
import { useState } from 'react';
|
|
119
|
-
|
|
120
|
-
const MyComponent = () => {
|
|
121
|
-
const [open, setOpen] = useState(false);
|
|
122
|
-
|
|
123
|
-
return (
|
|
124
|
-
<>
|
|
125
|
-
<CapButton onClick={() => setOpen(true)}>Open Drawer</CapButton>
|
|
126
|
-
<CapDrawer
|
|
127
|
-
open={open}
|
|
128
|
-
onOpenChange={setOpen}
|
|
129
|
-
title="Drawer Title"
|
|
130
|
-
content={<div>Drawer content goes here</div>}
|
|
131
|
-
/>
|
|
132
|
-
</>
|
|
133
|
-
);
|
|
134
|
-
};
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Using Size Presets
|
|
138
|
-
|
|
139
|
-
```tsx
|
|
140
|
-
<CapDrawer
|
|
141
|
-
open={open}
|
|
142
|
-
onOpenChange={setOpen}
|
|
143
|
-
size="l" // 75vw width
|
|
144
|
-
title="Large Drawer"
|
|
145
|
-
content={<div>Content</div>}
|
|
146
|
-
/>
|
|
147
|
-
|
|
148
|
-
<CapDrawer
|
|
149
|
-
open={open}
|
|
150
|
-
onOpenChange={setOpen}
|
|
151
|
-
size="r" // 50vw width
|
|
152
|
-
title="Regular Drawer"
|
|
153
|
-
content={<div>Content</div>}
|
|
154
|
-
/>
|
|
155
|
-
|
|
156
|
-
<CapDrawer
|
|
157
|
-
open={open}
|
|
158
|
-
onOpenChange={setOpen}
|
|
159
|
-
size="s" // 25vw width
|
|
160
|
-
title="Small Drawer"
|
|
161
|
-
content={<div>Content</div>}
|
|
162
|
-
/>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### Custom Width
|
|
166
|
-
|
|
167
|
-
```tsx
|
|
168
|
-
<CapDrawer
|
|
169
|
-
open={open}
|
|
170
|
-
onOpenChange={setOpen}
|
|
171
|
-
width={400} // 400px
|
|
172
|
-
title="Custom Width Drawer"
|
|
173
|
-
content={<div>Content</div>}
|
|
174
|
-
/>
|
|
175
|
-
|
|
176
|
-
<CapDrawer
|
|
177
|
-
open={open}
|
|
178
|
-
onOpenChange={setOpen}
|
|
179
|
-
width="30vw" // 30% viewport width
|
|
180
|
-
title="Viewport Width Drawer"
|
|
181
|
-
content={<div>Content</div>}
|
|
182
|
-
/>
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
## TypeScript
|
|
187
|
-
|
|
188
|
-
The component is fully typed with TypeScript. Import types as needed:
|
|
189
|
-
|
|
190
|
-
```tsx
|
|
191
|
-
import type { CapDrawerProps } from '@capillarytech/blaze-ui';
|
|
192
|
-
|
|
193
|
-
const MyDrawer: React.FC<CapDrawerProps> = (props) => {
|
|
194
|
-
// ...
|
|
195
|
-
};
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## Related Components
|
|
199
|
-
|
|
200
|
-
- `CapModal` - Modal dialog component
|
|
201
|
-
- `CapPopover` - Popover component
|
|
202
|
-
- `CapTooltip` - Tooltip component
|
|
203
|
-
|
|
204
|
-
## References
|
|
205
|
-
|
|
206
|
-
- [Ant Design Drawer Documentation](https://ant.design/components/drawer)
|
|
207
|
-
- [Ant Design Migration Guide](https://ant.design/docs/react/migration-v6)
|
package/CapDrawer/Status.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapDrawer
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-02-06 02:24:50
|
|
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 02:24:50
|
|
36
|
-
**Maximum Mismatch**: 0%
|
|
37
|
-
|
|
38
|
-
### Mismatched Variants:
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## CSS Fixes Applied
|
|
43
|
-
|
|
44
|
-
**Date**: 2026-01-31 20:57:16
|
|
45
|
-
**Summary**: CSS fixes applied based on visual testing analysis.
|
|
46
|
-
|
|
47
|
-
_See full analysis in: `/Users/sarahkhader/repos/migration/blaze-ui/tools/visual-testing/report/CapDrawer/css-fix-analysis.md`_
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## Notes
|
|
51
|
-
|
|
52
|
-
_No notes yet._
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
# CapDrawer - Missing Use Cases Analysis
|
|
2
|
-
|
|
3
|
-
## Phase 1: Use Cases NOT Fulfilled by Component
|
|
4
|
-
|
|
5
|
-
**Note**: Unable to access Google Sheets spreadsheet. Analysis based on component code review, Ant Design Drawer API, and common drawer use cases.
|
|
6
|
-
|
|
7
|
-
### 1. **Footer Support**
|
|
8
|
-
- ❌ **No footer prop** - Ant Design Drawer supports `footer` prop, but CapDrawer doesn't expose it
|
|
9
|
-
- ❌ **No footer slot** - Cannot add footer content (e.g., action buttons) without custom content manipulation
|
|
10
|
-
- **Impact**: Users must manually add footer elements to content prop
|
|
11
|
-
- **Workaround**: Add footer elements to `content` prop
|
|
12
|
-
|
|
13
|
-
### 2. **Extra Actions/Header Actions**
|
|
14
|
-
- ❌ **No extra prop** - Ant Design Drawer supports `extra` prop for header actions, but CapDrawer doesn't expose it
|
|
15
|
-
- ❌ **No header actions slot** - Cannot add custom header buttons/icons without modifying title
|
|
16
|
-
- **Impact**: Limited header customization options
|
|
17
|
-
- **Workaround**: Include extra actions in `title` prop as React node
|
|
18
|
-
|
|
19
|
-
### 3. **Force Render**
|
|
20
|
-
- ❌ **No forceRender prop** - Ant Design Drawer supports `forceRender` to render drawer content even when closed
|
|
21
|
-
- **Impact**: Cannot pre-render drawer content for performance optimization
|
|
22
|
-
- **Workaround**: None - would need to add prop passthrough
|
|
23
|
-
|
|
24
|
-
### 4. **Get Container**
|
|
25
|
-
- ❌ **No getContainer prop** - Ant Design Drawer supports `getContainer` to control portal container
|
|
26
|
-
- **Impact**: Drawer always renders in document.body portal, cannot be scoped to specific container
|
|
27
|
-
- **Workaround**: None - would need to add prop passthrough
|
|
28
|
-
|
|
29
|
-
### 5. **Keyboard Support**
|
|
30
|
-
- ⚠️ **Limited keyboard handling** - ESC key support exists but not explicitly tested or documented
|
|
31
|
-
- ❌ **No keyboard prop** - Cannot disable keyboard shortcuts
|
|
32
|
-
- ❌ **No custom keyboard handlers** - Cannot override default keyboard behavior
|
|
33
|
-
- **Impact**: Limited control over keyboard interactions
|
|
34
|
-
|
|
35
|
-
### 6. **Z-Index Control**
|
|
36
|
-
- ❌ **No zIndex prop** - Ant Design Drawer supports `zIndex` prop, but CapDrawer doesn't expose it
|
|
37
|
-
- **Impact**: Cannot control drawer stacking order when multiple drawers are present
|
|
38
|
-
- **Workaround**: Use CSS to override z-index, but not ideal
|
|
39
|
-
|
|
40
|
-
### 7. **Auto Focus**
|
|
41
|
-
- ❌ **No autoFocus prop** - Ant Design Drawer supports `autoFocus` to control focus behavior
|
|
42
|
-
- **Impact**: Cannot prevent auto-focus on open (may interfere with form inputs)
|
|
43
|
-
- **Workaround**: None - would need to add prop passthrough
|
|
44
|
-
|
|
45
|
-
### 8. **Root Class Name**
|
|
46
|
-
- ❌ **No rootClassName prop** - Ant Design Drawer v6 supports `rootClassName` for root element styling
|
|
47
|
-
- **Impact**: Limited styling options for drawer wrapper
|
|
48
|
-
- **Workaround**: Use `className` prop, but may not target root element
|
|
49
|
-
|
|
50
|
-
### 9. **Styles API**
|
|
51
|
-
- ❌ **No styles prop** - Ant Design Drawer v6 supports `styles` prop for body/header/footer styling
|
|
52
|
-
- **Impact**: Cannot customize individual drawer sections without CSS overrides
|
|
53
|
-
- **Workaround**: Use CSS classes, but less flexible than styles API
|
|
54
|
-
|
|
55
|
-
### 10. **Class Names API**
|
|
56
|
-
- ❌ **No classNames prop** - Ant Design Drawer v6 supports `classNames` prop for body/header/footer classes
|
|
57
|
-
- **Impact**: Limited ability to target specific drawer sections with CSS
|
|
58
|
-
- **Workaround**: Use `className` prop, but may not target specific sections
|
|
59
|
-
|
|
60
|
-
### 11. **After Open/Close Callbacks**
|
|
61
|
-
- ❌ **No afterOpenChange callback** - Ant Design Drawer supports `afterOpenChange` for post-animation callbacks
|
|
62
|
-
- **Impact**: Cannot execute logic after drawer animation completes
|
|
63
|
-
- **Workaround**: Use `onOpenChange` with timeout, but not ideal
|
|
64
|
-
|
|
65
|
-
### 12. **Drawer Content Loading States**
|
|
66
|
-
- ❌ **No loading prop** - Cannot show loading state within drawer
|
|
67
|
-
- ❌ **No loading indicator** - No built-in loading spinner support
|
|
68
|
-
- **Impact**: Must manually handle loading states in content
|
|
69
|
-
- **Workaround**: Add loading components to `content` prop
|
|
70
|
-
|
|
71
|
-
### 13. **Drawer Content Error States**
|
|
72
|
-
- ❌ **No error prop** - Cannot display error messages or error states
|
|
73
|
-
- ❌ **No error styling** - No built-in error state support
|
|
74
|
-
- **Impact**: Must manually handle error states in content
|
|
75
|
-
- **Workaround**: Add error components to `content` prop
|
|
76
|
-
|
|
77
|
-
### 14. **Drawer Size Presets Limitations**
|
|
78
|
-
- ⚠️ **Limited size options** - Only supports 's', 'r', 'l' presets (25vw, 50vw, 75vw)
|
|
79
|
-
- ❌ **No extra-small or extra-large** - Cannot use 'xs' or 'xl' sizes
|
|
80
|
-
- ❌ **No custom preset sizes** - Cannot define custom size presets
|
|
81
|
-
- **Impact**: Limited size options, must use `width` prop for other sizes
|
|
82
|
-
|
|
83
|
-
### 15. **Drawer Content Validation**
|
|
84
|
-
- ❌ **No content validation** - Doesn't validate content prop type
|
|
85
|
-
- ❌ **No empty state handling** - No built-in empty state support
|
|
86
|
-
- **Impact**: Must manually handle empty/null content cases
|
|
87
|
-
|
|
88
|
-
### 16. **Drawer Animation Control**
|
|
89
|
-
- ❌ **No motion customization** - Cannot customize open/close animations
|
|
90
|
-
- ❌ **No animation duration control** - Cannot adjust animation speed
|
|
91
|
-
- **Impact**: Limited animation customization options
|
|
92
|
-
|
|
93
|
-
### 17. **Drawer Resize Support**
|
|
94
|
-
- ❌ **No resizable prop** - Ant Design Drawer doesn't support resizing, but some use cases may require it
|
|
95
|
-
- **Impact**: Cannot allow users to resize drawer width
|
|
96
|
-
- **Workaround**: Would need custom implementation
|
|
97
|
-
|
|
98
|
-
### 18. **Multiple Drawers**
|
|
99
|
-
- ⚠️ **No multi-drawer coordination** - No built-in support for managing multiple drawers
|
|
100
|
-
- ❌ **No drawer stack management** - Cannot control which drawer is on top
|
|
101
|
-
- **Impact**: Complex scenarios with multiple drawers require manual management
|
|
102
|
-
|
|
103
|
-
### 19. **Drawer State Persistence**
|
|
104
|
-
- ❌ **No state persistence** - Cannot persist drawer open state across page reloads
|
|
105
|
-
- ❌ **No localStorage integration** - No built-in state persistence
|
|
106
|
-
- **Impact**: Must manually implement state persistence if needed
|
|
107
|
-
|
|
108
|
-
### 20. **Drawer Content Scrolling**
|
|
109
|
-
- ⚠️ **Limited scroll control** - Ant Design Drawer handles scrolling, but no custom scroll behavior
|
|
110
|
-
- ❌ **No scroll restoration** - Cannot restore scroll position on reopen
|
|
111
|
-
- **Impact**: Scroll position resets when drawer closes/reopens
|
|
112
|
-
|
|
113
|
-
### 21. **Drawer Content Lazy Loading**
|
|
114
|
-
- ❌ **No lazy loading** - Content always renders when drawer is open
|
|
115
|
-
- ❌ **No code splitting support** - Cannot lazy load drawer content
|
|
116
|
-
- **Impact**: All drawer content loads immediately, may affect performance
|
|
117
|
-
|
|
118
|
-
### 22. **Drawer Form Integration**
|
|
119
|
-
- ❌ **No form integration helpers** - No built-in Form.Item wrapper or validation
|
|
120
|
-
- ❌ **No form state management** - Must manually handle form state
|
|
121
|
-
- **Impact**: Forms in drawers require manual setup
|
|
122
|
-
|
|
123
|
-
### 23. **Drawer Content Preloading**
|
|
124
|
-
- ❌ **No preload prop** - Cannot preload drawer content before opening
|
|
125
|
-
- **Impact**: Content loads only when drawer opens, may cause delay
|
|
126
|
-
|
|
127
|
-
### 24. **Drawer Accessibility Enhancements**
|
|
128
|
-
- ⚠️ **Basic accessibility** - Relies on Ant Design defaults
|
|
129
|
-
- ❌ **No aria-label prop** - Cannot provide custom aria-label
|
|
130
|
-
- ❌ **No aria-describedby** - Cannot link to descriptive text
|
|
131
|
-
- ❌ **No focus trap customization** - Cannot customize focus trap behavior
|
|
132
|
-
- **Impact**: Limited accessibility customization options
|
|
133
|
-
|
|
134
|
-
### 25. **Drawer Content Templates**
|
|
135
|
-
- ❌ **No content templates** - No built-in templates for common drawer patterns
|
|
136
|
-
- ❌ **No drawer types** - No preset drawer types (form, list, detail, etc.)
|
|
137
|
-
- **Impact**: Must build drawer content from scratch each time
|
|
138
|
-
|
|
139
|
-
## Recommendations
|
|
140
|
-
|
|
141
|
-
### High Priority
|
|
142
|
-
1. Add `footer` prop passthrough for action buttons
|
|
143
|
-
2. Add `extra` prop passthrough for header actions
|
|
144
|
-
3. Add `getContainer` prop passthrough for portal control
|
|
145
|
-
4. Add `zIndex` prop passthrough for stacking control
|
|
146
|
-
5. Add `afterOpenChange` callback for post-animation logic
|
|
147
|
-
|
|
148
|
-
### Medium Priority
|
|
149
|
-
1. Add `forceRender` prop for performance optimization
|
|
150
|
-
2. Add `autoFocus` prop for focus control
|
|
151
|
-
3. Add `rootClassName`, `styles`, and `classNames` props (Ant Design v6 API)
|
|
152
|
-
4. Add `keyboard` prop for keyboard control
|
|
153
|
-
5. Improve accessibility props (aria-label, aria-describedby)
|
|
154
|
-
|
|
155
|
-
### Low Priority
|
|
156
|
-
1. Add more size presets (xs, xl)
|
|
157
|
-
2. Add drawer content loading state helpers
|
|
158
|
-
3. Add drawer state persistence helpers
|
|
159
|
-
4. Add drawer content templates
|
|
160
|
-
5. Add resizable drawer support (custom feature)
|
|
161
|
-
|
|
162
|
-
## Current Component Strengths
|
|
163
|
-
✅ Backward compatibility with `visible` and `onVisibleChange` props
|
|
164
|
-
✅ Custom `content` prop mapping to children
|
|
165
|
-
✅ Custom `size` prop for width presets
|
|
166
|
-
✅ Custom `width` prop for explicit width values
|
|
167
|
-
✅ Comprehensive Ant Design Drawer prop passthrough (most props)
|
|
168
|
-
✅ Deprecation warnings for legacy props
|
|
169
|
-
✅ TypeScript support with proper types
|
|
170
|
-
✅ Clean API with sensible defaults
|