@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/CapSKUUploader/README.md
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
# CapSKUUploader Migration Guide
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
CapSKUUploader has been migrated from `cap-ui-library` to `blaze-ui` with the following changes:
|
|
6
|
-
|
|
7
|
-
- Converted from JavaScript to TypeScript
|
|
8
|
-
- Converted from styled-components to SCSS modules
|
|
9
|
-
- Added TypeScript interfaces for props
|
|
10
|
-
- Maintained backward compatibility with the existing API
|
|
11
|
-
|
|
12
|
-
## Breaking Changes
|
|
13
|
-
|
|
14
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
15
|
-
|
|
16
|
-
The component maintains full backward compatibility with the existing API.
|
|
17
|
-
|
|
18
|
-
## Ant Design Component Usage
|
|
19
|
-
|
|
20
|
-
**CapSKUUploader does not directly use any Ant Design components.**
|
|
21
|
-
|
|
22
|
-
The component only uses Cap components from the blaze-ui library:
|
|
23
|
-
- `CapCSVFileUploader`
|
|
24
|
-
- `CapRow`
|
|
25
|
-
- `CapIcon`
|
|
26
|
-
- `CapLabel`
|
|
27
|
-
- `CapTag`
|
|
28
|
-
- `CapTruncateList`
|
|
29
|
-
|
|
30
|
-
All Ant Design component prop changes are handled internally by these Cap components. If you need to verify Ant Design prop changes, please refer to the documentation for the specific Cap components used.
|
|
31
|
-
|
|
32
|
-
## Deprecated Props
|
|
33
|
-
|
|
34
|
-
**No deprecated Ant Design props in CapSKUUploader**
|
|
35
|
-
|
|
36
|
-
Since CapSKUUploader does not directly consume Ant Design components, there are no Ant Design deprecated props to document for this component.
|
|
37
|
-
|
|
38
|
-
### Verification Results
|
|
39
|
-
|
|
40
|
-
- ✅ **Ant Design Imports**: None found
|
|
41
|
-
- ✅ **Direct Ant Design Usage**: None found
|
|
42
|
-
- ✅ **Deprecated Props**: None to document
|
|
43
|
-
|
|
44
|
-
**Verification Date**: 2026-02-01
|
|
45
|
-
|
|
46
|
-
## Prop Changes
|
|
47
|
-
|
|
48
|
-
### Component Props
|
|
49
|
-
|
|
50
|
-
| Prop | Type | Default | Description |
|
|
51
|
-
|------|------|---------|-------------|
|
|
52
|
-
| `validateSkuIds` | `(skuIds: string[]) => Promise<{result?: Array<Array<{skuId: string; isValidSku: boolean}>>}>` | - | Function to validate SKU IDs |
|
|
53
|
-
| `setSkuList` | `(skuList: SKUList) => void` | - | Callback to set the SKU list |
|
|
54
|
-
| `skuList` | `SKUList` | `undefined` | Current SKU list state |
|
|
55
|
-
| `removeUploadedSkus` | `() => void` | - | Callback to remove uploaded SKUs |
|
|
56
|
-
| `validatingSKUs` | `string` | - | Locale message for validating SKUs |
|
|
57
|
-
| `invalid` | `string` | - | Locale message for invalid SKUs |
|
|
58
|
-
| `invalidSKUs` | `string` | - | Locale message for invalid SKUs label |
|
|
59
|
-
| `valid` | `string` | - | Locale message for valid SKUs |
|
|
60
|
-
| `addedSKUsMsg` | `string` | - | Locale message for added SKUs |
|
|
61
|
-
| `skuFileName` | `string` | - | Filename for valid SKU CSV download |
|
|
62
|
-
| `invalidSKUFilename` | `string` | - | Filename for invalid SKU CSV download |
|
|
63
|
-
| `uploadedMsg` | `string` | - | Locale message for uploaded SKUs |
|
|
64
|
-
|
|
65
|
-
### SKUList Interface
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
interface SKUList {
|
|
69
|
-
valid?: string[];
|
|
70
|
-
inValid?: string[];
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Migration Steps
|
|
75
|
-
|
|
76
|
-
### Step 1: Update Import
|
|
77
|
-
|
|
78
|
-
```tsx
|
|
79
|
-
// Before (cap-ui-library)
|
|
80
|
-
import CapSKUUploader from '@capillarytech/cap-ui-library/CapSKUUploader';
|
|
81
|
-
|
|
82
|
-
// After (blaze-ui)
|
|
83
|
-
import { CapSKUUploader } from '@capillarytech/blaze-ui';
|
|
84
|
-
// or
|
|
85
|
-
import CapSKUUploader from '@capillarytech/blaze-ui/components/CapSKUUploader';
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Step 2: TypeScript Support (New Benefit)
|
|
89
|
-
|
|
90
|
-
If using TypeScript, you now get full type checking:
|
|
91
|
-
|
|
92
|
-
```tsx
|
|
93
|
-
import { CapSKUUploader } from '@capillarytech/blaze-ui';
|
|
94
|
-
import type { CapSKUUploaderProps } from '@capillarytech/blaze-ui';
|
|
95
|
-
|
|
96
|
-
const props: CapSKUUploaderProps = {
|
|
97
|
-
validateSkuIds: async (skuIds) => {
|
|
98
|
-
// Validation logic
|
|
99
|
-
return { result: [] };
|
|
100
|
-
},
|
|
101
|
-
setSkuList: (skuList) => {
|
|
102
|
-
// Set SKU list logic
|
|
103
|
-
},
|
|
104
|
-
skuList: { valid: [], inValid: [] },
|
|
105
|
-
removeUploadedSkus: () => {
|
|
106
|
-
// Remove logic
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Examples
|
|
112
|
-
|
|
113
|
-
### Basic Usage
|
|
114
|
-
|
|
115
|
-
```tsx
|
|
116
|
-
import { CapSKUUploader } from '@capillarytech/blaze-ui';
|
|
117
|
-
import { useState } from 'react';
|
|
118
|
-
|
|
119
|
-
function MyComponent() {
|
|
120
|
-
const [skuList, setSkuList] = useState({ valid: [], inValid: [] });
|
|
121
|
-
|
|
122
|
-
const validateSkuIds = async (skuIds: string[]) => {
|
|
123
|
-
// Your validation API call
|
|
124
|
-
const response = await fetch('/api/validate-skus', {
|
|
125
|
-
method: 'POST',
|
|
126
|
-
body: JSON.stringify({ skuIds }),
|
|
127
|
-
});
|
|
128
|
-
return response.json();
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const removeUploadedSkus = () => {
|
|
132
|
-
setSkuList({ valid: [], inValid: [] });
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
return (
|
|
136
|
-
<CapSKUUploader
|
|
137
|
-
validateSkuIds={validateSkuIds}
|
|
138
|
-
setSkuList={setSkuList}
|
|
139
|
-
skuList={skuList}
|
|
140
|
-
removeUploadedSkus={removeUploadedSkus}
|
|
141
|
-
/>
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## TypeScript Types
|
|
147
|
-
|
|
148
|
-
```typescript
|
|
149
|
-
import type { CapSKUUploaderProps, SKUList } from '@capillarytech/blaze-ui/CapSKUUploader';
|
|
150
|
-
|
|
151
|
-
interface CapSKUUploaderProps {
|
|
152
|
-
validateSkuIds: (skuIds: string[]) => Promise<{
|
|
153
|
-
result?: Array<Array<{ skuId: string; isValidSku: boolean }>>;
|
|
154
|
-
}>;
|
|
155
|
-
setSkuList: (skuList: SKUList) => void;
|
|
156
|
-
skuList?: SKUList;
|
|
157
|
-
removeUploadedSkus: () => void;
|
|
158
|
-
/* Locale messages */
|
|
159
|
-
validatingSKUs?: string;
|
|
160
|
-
invalid?: string;
|
|
161
|
-
invalidSKUs?: string;
|
|
162
|
-
valid?: string;
|
|
163
|
-
addedSKUsMsg?: string;
|
|
164
|
-
skuFileName?: string;
|
|
165
|
-
invalidSKUFilename?: string;
|
|
166
|
-
uploadedMsg?: string;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
interface SKUList {
|
|
170
|
-
valid?: string[];
|
|
171
|
-
inValid?: string[];
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Notes
|
|
176
|
-
|
|
177
|
-
- The component uses SCSS modules for styling to avoid style conflicts
|
|
178
|
-
- All props maintain backward compatibility with `cap-ui-library` v8.x
|
|
179
|
-
- The component does not directly use Ant Design components, so no Ant Design prop migration is required
|
|
180
|
-
- Child components (CapCSVFileUploader, CapRow, etc.) handle their own Ant Design prop changes internally
|
|
181
|
-
|
|
182
|
-
## Related Components
|
|
183
|
-
|
|
184
|
-
- `CapCSVFileUploader` - CSV file uploader component used internally
|
|
185
|
-
- `CapRow` - Row layout component
|
|
186
|
-
- `CapTag` - Tag component for displaying SKU list
|
|
187
|
-
- `CapTruncateList` - Component for truncating long lists
|
|
188
|
-
- `CapIcon` - Icon component
|
|
189
|
-
- `CapLabel` - Label component
|
package/CapSKUUploader/Status.md
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapSKUUploader
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-02-22 20:15:00
|
|
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
|
-
✅ **Verification Complete** - 2026-02-01
|
|
26
|
-
|
|
27
|
-
**Result**: CapSKUUploader does not directly use any Ant Design components.
|
|
28
|
-
|
|
29
|
-
**Findings**:
|
|
30
|
-
- ✅ No Ant Design imports found in component code
|
|
31
|
-
- ✅ Component only uses Cap components (CapCSVFileUploader, CapRow, CapIcon, CapLabel, CapTag, CapTruncateList)
|
|
32
|
-
- ✅ No deprecated Ant Design props to document
|
|
33
|
-
- ✅ README.md created with verification results
|
|
34
|
-
|
|
35
|
-
**Note**: All Ant Design component prop changes are handled internally by the Cap components used by CapSKUUploader. If Ant Design prop verification is needed, refer to the documentation for those specific Cap components.
|
|
36
|
-
|
|
37
|
-
## Visual Testing Results
|
|
38
|
-
|
|
39
|
-
**Last Test**: 2026-02-22
|
|
40
|
-
**Threshold**: 2.0% (font rendering differences from antd v3→v5 migration)
|
|
41
|
-
**Maximum Mismatch**: 1.70%
|
|
42
|
-
|
|
43
|
-
| Variant | Diff % | Status |
|
|
44
|
-
|---------|--------|--------|
|
|
45
|
-
| default | 0% | ✓ Pass |
|
|
46
|
-
| validating | 0% | ✓ Pass |
|
|
47
|
-
| valid-skus | 1.70% | ✓ Pass |
|
|
48
|
-
| mixed-results | 1.70% | ✓ Pass |
|
|
49
|
-
| invalid-only | 1.07% | ✓ Pass |
|
|
50
|
-
| long-list | 1.61% | ✓ Pass |
|
|
51
|
-
| with-locale | 1.47% | ✓ Pass |
|
|
52
|
-
|
|
53
|
-
**Threshold rationale**: Variants showing the CapTag edit mode (valid-skus, mixed-results, long-list) have 1.61–1.70% diff due to font/text anti-aliasing rendering differences between antd v3 and v5. These are cosmetic only — the component renders visually correctly and the differences are imperceptible to the human eye.
|
|
54
|
-
|
|
55
|
-
## CSS Fixes Applied
|
|
56
|
-
|
|
57
|
-
**Date**: 2026-02-22
|
|
58
|
-
**Summary**:
|
|
59
|
-
- Updated CapSKUUploader/styles.scss to use `.cap-tag-v2` instead of `.ant-tag.cap-tag-v2` (antd v3 selector)
|
|
60
|
-
- Updated `.anticon-close` to `.ant-tag-close-icon` (antd v5 close icon class)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
## Notes
|
|
64
|
-
|
|
65
|
-
_No notes yet._
|
|
66
|
-
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# CapSecondaryTopBar
|
|
2
|
-
|
|
3
|
-
A secondary top bar component that displays primary and secondary menu items along with action menu items. Used for application navigation and actions.
|
|
4
|
-
|
|
5
|
-
## Breaking Changes
|
|
6
|
-
|
|
7
|
-
None - This component maintains backward compatibility with existing usage.
|
package/CapSelect/README.md
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
# CapSelect
|
|
2
|
-
|
|
3
|
-
A wrapper component around Ant Design's Select component that provides consistent styling and a simplified API for select dropdowns 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. API Changes
|
|
12
|
-
|
|
13
|
-
##### v3 → v4
|
|
14
|
-
|
|
15
|
-
| v3 API | v4 API | Status | Migration Guide |
|
|
16
|
-
|--------|--------|--------|-----------------|
|
|
17
|
-
| `combobox` | `mode="combobox"` | Removed | Use `<Select mode="combobox" />` instead. |
|
|
18
|
-
| `dropdownClassName` | `popupClassName` | Deprecated | Replace `dropdownClassName` with `popupClassName`. Backward compatibility maintained. |
|
|
19
|
-
| `dropdownStyle` | `popupStyle` | Deprecated | Replace `dropdownStyle` with `popupStyle`. Backward compatibility maintained. |
|
|
20
|
-
| `getPopupContainer` | `getPopupContainer` | Behavior Change | Default changed to `document.body`. Explicitly set if different behavior needed. |
|
|
21
|
-
|
|
22
|
-
##### v4 → v5
|
|
23
|
-
|
|
24
|
-
| v4 API | v5 API | Status | Migration Guide |
|
|
25
|
-
|--------|--------|--------|-----------------|
|
|
26
|
-
| `showArrow` | N/A | Deprecated | Arrow visibility is handled internally. Remove this prop. |
|
|
27
|
-
| `clearIcon` | `allowClear={{ clearIcon }}` | Deprecated | Use `allowClear={{ clearIcon }}` instead. Backward compatibility maintained. |
|
|
28
|
-
| `removeIcon` | `menuItemSelectedIcon` | Deprecated | Use `menuItemSelectedIcon` for selected items in dropdown. Backward compatibility maintained. |
|
|
29
|
-
| `bordered` | `variant="outlined" \| "borderless"` | Deprecated | Use `variant="outlined"` (bordered) or `variant="borderless"` (unbordered). Backward compatibility maintained. |
|
|
30
|
-
| `dropdownMatchSelectWidth` | `popupMatchSelectWidth` | Deprecated | Replace `dropdownMatchSelectWidth` with `popupMatchSelectWidth`. Backward compatibility maintained. |
|
|
31
|
-
|
|
32
|
-
##### v5 → v6
|
|
33
|
-
|
|
34
|
-
| v5 API | v6 API | Status | Migration Guide |
|
|
35
|
-
|--------|--------|--------|-----------------|
|
|
36
|
-
| `dropdownRender` | `popupRender` | Deprecated | Replace `dropdownRender` with `popupRender`. Backward compatibility maintained. |
|
|
37
|
-
| `onDropdownVisibleChange` | `onPopupVisibleChange` | Deprecated | Replace `onDropdownVisibleChange` with `onPopupVisibleChange`. Backward compatibility maintained. |
|
|
38
|
-
| `virtual` | N/A | Deprecated | Virtual scroll is always enabled. Remove this prop. |
|
|
39
|
-
| `status` | Form.Item | Deprecated | Use `Form.Item` for validation status instead. Remove this prop. |
|
|
40
|
-
|
|
41
|
-
### Backward Compatibility
|
|
42
|
-
|
|
43
|
-
The component maintains backward compatibility for all deprecated props:
|
|
44
|
-
|
|
45
|
-
**v3 → v4:**
|
|
46
|
-
- **`dropdownClassName`**: Still works but logs a deprecation warning. Use `popupClassName` instead.
|
|
47
|
-
- **`dropdownStyle`**: Still works but logs a deprecation warning. Use `popupStyle` instead.
|
|
48
|
-
- **`getPopupContainer`**: Still works. Note: Default behavior changed to `document.body`.
|
|
49
|
-
|
|
50
|
-
**v4 → v5:**
|
|
51
|
-
- **`showArrow`**: Ignored (arrow visibility handled internally). Logs a deprecation warning.
|
|
52
|
-
- **`clearIcon`**: Mapped to `allowClear={{ clearIcon }}`. Logs a deprecation warning.
|
|
53
|
-
- **`removeIcon`**: Still works but logs a deprecation warning. Use `menuItemSelectedIcon` instead.
|
|
54
|
-
- **`bordered`**: Mapped to `variant` (`true` → `"outlined"`, `false` → `"borderless"`). Logs a deprecation warning.
|
|
55
|
-
- **`dropdownMatchSelectWidth`**: Still works but logs a deprecation warning. Use `popupMatchSelectWidth` instead.
|
|
56
|
-
|
|
57
|
-
**v5 → v6:**
|
|
58
|
-
- **`dropdownRender`**: Still works but logs a deprecation warning. Use `popupRender` instead.
|
|
59
|
-
- **`onDropdownVisibleChange`**: Still works but logs a deprecation warning. Use `onPopupVisibleChange` instead.
|
|
60
|
-
- **`virtual`**: Ignored (virtual scroll always enabled). Logs a deprecation warning.
|
|
61
|
-
- **`status`**: Ignored. Use `Form.Item` for validation status. Logs a deprecation warning.
|
|
62
|
-
|
|
63
|
-
### Style Changes
|
|
64
|
-
|
|
65
|
-
**Approach**: The component now uses Ant Design v6's design token system for most styling. Custom styles are applied via CSS Modules with `styles[classname]` syntax.
|
|
66
|
-
|
|
67
|
-
**Tokenizable Styles**: The following styles are now controlled through theme tokens in `getCapThemeConfig.ts`:
|
|
68
|
-
- Border colors (default, hover, active, disabled)
|
|
69
|
-
- Background colors (container, disabled, selected, active)
|
|
70
|
-
- Text colors (default, placeholder, disabled, selected)
|
|
71
|
-
- Font sizes and weights
|
|
72
|
-
- Option padding
|
|
73
|
-
- Multiple selection item styling
|
|
74
|
-
|
|
75
|
-
**Non-Tokenizable Styles**: The following styles require `:global` blocks with `// OVERRIDE:` comments:
|
|
76
|
-
- Arrow icon positioning and transforms
|
|
77
|
-
- Clear icon positioning
|
|
78
|
-
- Multiple selection choice remove icon vertical alignment
|
|
79
|
-
- Multiple selection rendered padding positioning
|
|
80
|
-
- Selected option pseudo-element indicator (::before)
|
|
81
|
-
- Selected icon colors in hover/selected states
|
|
82
|
-
|
|
83
|
-
### Code Improvements
|
|
84
|
-
|
|
85
|
-
1. **Removed PropTypes**: Replaced with TypeScript interfaces
|
|
86
|
-
2. **Using CSS Modules**: Now uses `styles[classname]` pattern instead of global class names
|
|
87
|
-
3. **Improved backward compatibility**: Deprecated props are mapped using nullish coalescing (`??`) for cleaner code
|
|
88
|
-
4. **Tokenization over CSS overrides**: Most styling is now controlled through Ant Design theme tokens instead of custom CSS
|
|
89
|
-
5. **Type safety**: Full TypeScript support with proper type exports
|
|
90
|
-
|
|
91
|
-
### What Stayed the Same
|
|
92
|
-
|
|
93
|
-
- All select functionality (single, multiple, searchable)
|
|
94
|
-
- Option rendering with tooltips
|
|
95
|
-
- Custom icons (remove, suffix, selected)
|
|
96
|
-
- `getMenuOptionsProps` function support
|
|
97
|
-
- `propToBeMadeLabel` functionality
|
|
98
|
-
- Integration with `ComponentWithLabelHOC`
|
|
99
|
-
- `CapCustomSelect` static property
|
|
100
|
-
|
|
101
|
-
### What Changed
|
|
102
|
-
|
|
103
|
-
- **Removed**: PropTypes dependency
|
|
104
|
-
- **Changed**: `dropdownClassName` → `popupClassName` (with backward compatibility)
|
|
105
|
-
- **Changed**: Styling approach from SCSS overrides to design tokens + CSS Modules
|
|
106
|
-
- **Changed**: Import from `antd` to `antd-v5`
|
|
107
|
-
|
|
108
|
-
## Usage
|
|
109
|
-
|
|
110
|
-
```tsx
|
|
111
|
-
import CapSelect from '@capillarytech/blaze-ui/components/CapSelect';
|
|
112
|
-
|
|
113
|
-
const options = [
|
|
114
|
-
{ value: '1', label: 'Option 1' },
|
|
115
|
-
{ value: '2', label: 'Option 2', tooltip: 'Tooltip for option 2' },
|
|
116
|
-
];
|
|
117
|
-
|
|
118
|
-
<CapSelect
|
|
119
|
-
options={options}
|
|
120
|
-
placeholder="Select an option"
|
|
121
|
-
popupClassName="custom-dropdown-class"
|
|
122
|
-
/>
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Props
|
|
126
|
-
|
|
127
|
-
See `types.ts` for complete TypeScript interface definitions.
|
|
128
|
-
|
|
129
|
-
### Required Props
|
|
130
|
-
|
|
131
|
-
- `options`: Array of select options (required)
|
|
132
|
-
|
|
133
|
-
### Optional Props
|
|
134
|
-
|
|
135
|
-
- `componentClassName`: Custom className for the select component
|
|
136
|
-
- `popupClassName`: Custom className for the dropdown popup (use instead of deprecated `dropdownClassName`)
|
|
137
|
-
- `dropdownClassName`: **Deprecated** - Use `popupClassName` instead
|
|
138
|
-
- `propToBeMadeLabel`: Property name to use as label if different from 'label'
|
|
139
|
-
- `getMenuOptionsProps`: Function to get additional props for menu options
|
|
140
|
-
- All other `SelectProps` from `antd-v5` are supported
|
|
141
|
-
|
|
142
|
-
## Theme Customization
|
|
143
|
-
|
|
144
|
-
The component uses design tokens from `getCapThemeConfig()`. To customize the appearance, override Select component tokens:
|
|
145
|
-
|
|
146
|
-
```tsx
|
|
147
|
-
import { ConfigProvider } from 'antd-v5';
|
|
148
|
-
import { getCapThemeConfig } from '@capillarytech/blaze-ui/utils';
|
|
149
|
-
|
|
150
|
-
const themeConfig = getCapThemeConfig({
|
|
151
|
-
components: {
|
|
152
|
-
Select: {
|
|
153
|
-
colorBorder: '#custom-color',
|
|
154
|
-
optionSelectedBg: '#custom-selected-bg',
|
|
155
|
-
// ... other Select tokens
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
<ConfigProvider theme={themeConfig}>
|
|
161
|
-
<CapSelect options={options} />
|
|
162
|
-
</ConfigProvider>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Migration Guide
|
|
166
|
-
|
|
167
|
-
### Updating from v3 to v6
|
|
168
|
-
|
|
169
|
-
1. **Replace deprecated className/style props**:
|
|
170
|
-
```tsx
|
|
171
|
-
// Before
|
|
172
|
-
<CapSelect dropdownClassName="my-class" dropdownStyle={{ width: 200 }} />
|
|
173
|
-
|
|
174
|
-
// After
|
|
175
|
-
<CapSelect popupClassName="my-class" popupStyle={{ width: 200 }} />
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
2. **Replace deprecated clearIcon**:
|
|
179
|
-
```tsx
|
|
180
|
-
// Before
|
|
181
|
-
<CapSelect clearIcon={<Icon />} />
|
|
182
|
-
|
|
183
|
-
// After
|
|
184
|
-
<CapSelect allowClear={{ clearIcon: <Icon /> }} />
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
3. **Replace deprecated bordered**:
|
|
188
|
-
```tsx
|
|
189
|
-
// Before
|
|
190
|
-
<CapSelect bordered={true} />
|
|
191
|
-
<CapSelect bordered={false} />
|
|
192
|
-
|
|
193
|
-
// After
|
|
194
|
-
<CapSelect variant="outlined" />
|
|
195
|
-
<CapSelect variant="borderless" />
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
4. **Replace deprecated dropdownMatchSelectWidth**:
|
|
199
|
-
```tsx
|
|
200
|
-
// Before
|
|
201
|
-
<CapSelect dropdownMatchSelectWidth={false} />
|
|
202
|
-
|
|
203
|
-
// After
|
|
204
|
-
<CapSelect popupMatchSelectWidth={false} />
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
5. **Replace deprecated render/change handlers**:
|
|
208
|
-
```tsx
|
|
209
|
-
// Before
|
|
210
|
-
<CapSelect
|
|
211
|
-
dropdownRender={(menu) => <div>{menu}</div>}
|
|
212
|
-
onDropdownVisibleChange={(open) => {}}
|
|
213
|
-
/>
|
|
214
|
-
|
|
215
|
-
// After
|
|
216
|
-
<CapSelect
|
|
217
|
-
popupRender={(menu) => <div>{menu}</div>}
|
|
218
|
-
onPopupVisibleChange={(open) => {}}
|
|
219
|
-
/>
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
6. **Remove deprecated props**:
|
|
223
|
-
```tsx
|
|
224
|
-
// Before
|
|
225
|
-
<CapSelect showArrow={true} virtual={true} status="error" />
|
|
226
|
-
|
|
227
|
-
// After
|
|
228
|
-
<CapSelect />
|
|
229
|
-
// showArrow: handled internally
|
|
230
|
-
// virtual: always enabled
|
|
231
|
-
// status: use Form.Item instead
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
7. **Update imports** (if importing directly):
|
|
235
|
-
```tsx
|
|
236
|
-
// Before
|
|
237
|
-
import { Select } from 'antd';
|
|
238
|
-
|
|
239
|
-
// After (if needed)
|
|
240
|
-
import { Select } from 'antd-v5';
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
8. **Theme configuration**: Ensure your app is wrapped with `ConfigProvider` using `getCapThemeConfig()` for proper styling.
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# CapSelectFilter
|
|
2
|
-
|
|
3
|
-
A dropdown select filter component with badge support.
|
|
4
|
-
|
|
5
|
-
## Migration from cap-ui-library to blaze-ui
|
|
6
|
-
|
|
7
|
-
### Summary of Changes
|
|
8
|
-
|
|
9
|
-
This component has been migrated from `cap-ui-library` to `blaze-ui` with the following updates:
|
|
10
|
-
|
|
11
|
-
1. **Converted to TypeScript** - Full type safety with proper interfaces
|
|
12
|
-
2. **Functional Component** - Migrated from functional component (no changes needed)
|
|
13
|
-
3. **SCSS Modules** - Replaced styled-components with SCSS modules
|
|
14
|
-
4. **Ant Design v6** - Updated to use Ant Design v6 compatible APIs:
|
|
15
|
-
- Changed from `overlay` prop to `menu={{ items }}` API
|
|
16
|
-
- Used `dropdownRender` to wrap menu with custom styling
|
|
17
|
-
- Removed direct usage of `CapMenu` components in favor of menu items array
|
|
18
|
-
5. **CSS Units** - Converted all pixel values to rem units (base: 14px = 1rem)
|
|
19
|
-
6. **SCSS Variables** - Replaced hardcoded colors/spacing with SCSS variables
|
|
20
|
-
7. **React Hooks** - Added `useMemo` to optimize menu items generation
|
|
21
|
-
|
|
22
|
-
### Breaking Changes
|
|
23
|
-
|
|
24
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
25
|
-
|
|
26
|
-
All props remain the same and work identically to the cap-ui-library version.
|
|
27
|
-
|
|
28
|
-
### Props
|
|
29
|
-
|
|
30
|
-
| Prop | Type | Default | Description |
|
|
31
|
-
|------|------|---------|-------------|
|
|
32
|
-
| `className` | `string` | - | Additional CSS class for the dropdown wrapper |
|
|
33
|
-
| `overlayClassName` | `string` | - | Additional CSS class for the dropdown overlay |
|
|
34
|
-
| `onSelect` | `(event: React.MouseEvent<HTMLElement>) => void` | - | Callback when a menu item is selected |
|
|
35
|
-
| `selectedValue` | `string` | - | Currently selected value |
|
|
36
|
-
| `placeholder` | `React.ReactNode` | - | Placeholder text or node |
|
|
37
|
-
| `placement` | `'bottomLeft' \| 'bottom' \| 'bottomRight' \| 'topLeft' \| 'top' \| 'topRight'` | `'bottomLeft'` | Dropdown placement |
|
|
38
|
-
| `width` | `string` | `'80px'` | Width of the trigger element |
|
|
39
|
-
| `dropdownMaxHeight` | `string` | `'320px'` | Maximum height of dropdown menu |
|
|
40
|
-
| `dropdownWidth` | `string` | `'228px'` | Width of dropdown menu |
|
|
41
|
-
| `data` | `CapSelectFilterMenuItem[]` | `[]` | Array of menu items |
|
|
42
|
-
| `showBadge` | `boolean` | `false` | Whether to show a badge with count |
|
|
43
|
-
|
|
44
|
-
### Data Item Structure
|
|
45
|
-
|
|
46
|
-
```typescript
|
|
47
|
-
interface CapSelectFilterMenuItem {
|
|
48
|
-
key: string; // Unique key for React
|
|
49
|
-
value: string; // Value to match against selectedValue
|
|
50
|
-
label: React.ReactNode; // Display label
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### API Changes
|
|
55
|
-
|
|
56
|
-
None - all APIs remain backward compatible.
|
|
57
|
-
|
|
58
|
-
### Behavioral Changes
|
|
59
|
-
|
|
60
|
-
None - component behaves identically to cap-ui-library version.
|
|
61
|
-
|
|
62
|
-
### Migration Guide for Consumers
|
|
63
|
-
|
|
64
|
-
No migration needed! Simply update your import path:
|
|
65
|
-
|
|
66
|
-
**Before (cap-ui-library):**
|
|
67
|
-
```javascript
|
|
68
|
-
import CapSelectFilter from '@capillarytech/cap-ui-library/components/CapSelectFilter';
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**After (blaze-ui):**
|
|
72
|
-
```javascript
|
|
73
|
-
import CapSelectFilter from '@capillarytech/blaze-ui/components/CapSelectFilter';
|
|
74
|
-
// Or from the main export
|
|
75
|
-
import { CapSelectFilter } from '@capillarytech/blaze-ui';
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Usage Example
|
|
79
|
-
|
|
80
|
-
```tsx
|
|
81
|
-
import React, { useState } from 'react';
|
|
82
|
-
import CapSelectFilter from '@capillarytech/blaze-ui/components/CapSelectFilter';
|
|
83
|
-
|
|
84
|
-
const MyComponent = () => {
|
|
85
|
-
const [selectedValue, setSelectedValue] = useState('option1');
|
|
86
|
-
|
|
87
|
-
const data = [
|
|
88
|
-
{ key: '1', value: 'option1', label: 'Option 1' },
|
|
89
|
-
{ key: '2', value: 'option2', label: 'Option 2' },
|
|
90
|
-
{ key: '3', value: 'option3', label: 'Option 3' },
|
|
91
|
-
];
|
|
92
|
-
|
|
93
|
-
const handleSelect = (e: React.MouseEvent<HTMLElement>) => {
|
|
94
|
-
const target = e.currentTarget;
|
|
95
|
-
const value = target.getAttribute('value');
|
|
96
|
-
if (value) {
|
|
97
|
-
setSelectedValue(value);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
return (
|
|
102
|
-
<CapSelectFilter
|
|
103
|
-
placeholder="Select an option"
|
|
104
|
-
data={data}
|
|
105
|
-
selectedValue={selectedValue}
|
|
106
|
-
onSelect={handleSelect}
|
|
107
|
-
showBadge
|
|
108
|
-
/>
|
|
109
|
-
);
|
|
110
|
-
};
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Internal Implementation Notes
|
|
114
|
-
|
|
115
|
-
- Uses `CapDropdown` with Ant Design v6 `menu` API (not the old `overlay` API)
|
|
116
|
-
- Menu items are generated as an array of objects with `key`, `label`, `className`, and `onClick`
|
|
117
|
-
- Uses `dropdownRender` to wrap the menu with custom styling (border and scrolling)
|
|
118
|
-
- Styled with SCSS modules instead of styled-components
|
|
119
|
-
- All spacing and colors use SCSS variables from `components/styled/variables.scss`
|
|
120
|
-
- Badge count is calculated as `[selectedValue].length` (always shows 1 for single selection)
|
|
121
|
-
- Uses `useMemo` to optimize menu items generation and prevent unnecessary re-renders
|