@capillarytech/blaze-ui 5.21.0 → 5.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/CapLanguageProvider/actions.js +125 -0
  2. package/CapLanguageProvider/actions.js.map +1 -0
  3. package/CapLanguageProvider/constants.js +37 -0
  4. package/CapLanguageProvider/constants.js.map +1 -0
  5. package/package.json +1 -1
  6. package/CapActionBar/README.md +0 -11
  7. package/CapAdvancedIcon/README.md +0 -185
  8. package/CapAdvancedIcon/use-cases.md +0 -44
  9. package/CapAlert/README.md +0 -144
  10. package/CapAppNotEnabled/README.md +0 -84
  11. package/CapAskAira/README.md +0 -328
  12. package/CapBanner/README.md +0 -4
  13. package/CapBlock/README.md +0 -175
  14. package/CapBorderedBox/Status.md +0 -40
  15. package/CapCSVFileUploader/README.md +0 -124
  16. package/CapCSVFileUploader/Status.md +0 -47
  17. package/CapCard/README.md +0 -85
  18. package/CapCard/Status.md +0 -41
  19. package/CapCardBox/README.md +0 -169
  20. package/CapCardBox/Status.md +0 -52
  21. package/CapCarousel/README.md +0 -190
  22. package/CapCarousel/Status.md +0 -73
  23. package/CapCheckbox/README.md +0 -254
  24. package/CapCheckbox/Status.md +0 -41
  25. package/CapColorPicker/README.md +0 -112
  26. package/CapColorPicker/Status.md +0 -52
  27. package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
  28. package/CapColoredTag/README.md +0 -167
  29. package/CapColoredTag/Status.md +0 -49
  30. package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
  31. package/CapConditionPreview/README.md +0 -40
  32. package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
  33. package/CapCustomCard/README.md +0 -182
  34. package/CapCustomCard/Status.md +0 -40
  35. package/CapCustomCarousel/Status.md +0 -69
  36. package/CapCustomCheckboxList/README.md +0 -178
  37. package/CapCustomCheckboxList/Status.md +0 -52
  38. package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
  39. package/CapCustomList/README.md +0 -117
  40. package/CapCustomList/Status.md +0 -77
  41. package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
  42. package/CapCustomSelect/README.md +0 -38
  43. package/CapDatePicker/README.md +0 -139
  44. package/CapDateRangePicker/README.md +0 -159
  45. package/CapDateTimePicker/README.md +0 -136
  46. package/CapDateTimeRangePicker/README.md +0 -243
  47. package/CapDivider/README.md +0 -122
  48. package/CapDrawer/README.md +0 -207
  49. package/CapDrawer/Status.md +0 -52
  50. package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
  51. package/CapDropdown/README.md +0 -515
  52. package/CapDropdown/Status.md +0 -45
  53. package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
  54. package/CapError/README.md +0 -88
  55. package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
  56. package/CapErrorBoundary/README.md +0 -150
  57. package/CapErrorStateIllustration/README.md +0 -222
  58. package/CapErrorStateIllustration/USE_CASES.md +0 -33
  59. package/CapExpressionEditor/README.md +0 -32
  60. package/CapForm/README.md +0 -132
  61. package/CapForm/Status.md +0 -40
  62. package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
  63. package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
  64. package/CapFormItem/README.md +0 -320
  65. package/CapFormItem/Status.md +0 -73
  66. package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
  67. package/CapGraph/README.md +0 -69
  68. package/CapGraph/USE_CASES.md +0 -66
  69. package/CapHamburgerMenu/README.md +0 -234
  70. package/CapHamburgerMenu/USE_CASES.md +0 -48
  71. package/CapHeader/Status.md +0 -41
  72. package/CapHeading/README.md +0 -220
  73. package/CapHeading/Status.md +0 -41
  74. package/CapIcon/README.md +0 -207
  75. package/CapIllustration/Status.md +0 -41
  76. package/CapImage/README.md +0 -50
  77. package/CapImportMFEComponent/README.md +0 -121
  78. package/CapInfoNote/Status.md +0 -40
  79. package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
  80. package/CapInput/README.md +0 -196
  81. package/CapInput/Status.md +0 -123
  82. package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
  83. package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
  84. package/CapLanguageProvider/README.md +0 -206
  85. package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
  86. package/CapLevelGraphRenderer/README.md +0 -123
  87. package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
  88. package/CapLink/README.md +0 -203
  89. package/CapLink/Status.md +0 -32
  90. package/CapLink/tests/CapLink.missingUseCases.md +0 -95
  91. package/CapList/README.md +0 -129
  92. package/CapList/Status.md +0 -69
  93. package/CapListLayout/README.md +0 -7
  94. package/CapLogin/README.md +0 -7
  95. package/CapMenu/README.md +0 -86
  96. package/CapModal/README.md +0 -357
  97. package/CapModal/Status.md +0 -52
  98. package/CapModal/tests/USE_CASES_GAPS.md +0 -207
  99. package/CapMultiSelect/README.md +0 -170
  100. package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
  101. package/CapMultiSelectDatePicker/README.md +0 -11
  102. package/CapNavigation/README.md +0 -72
  103. package/CapNotification/README.md +0 -228
  104. package/CapNotificationDropdown/README.md +0 -5
  105. package/CapPopover/README.md +0 -234
  106. package/CapProgress/Status.md +0 -40
  107. package/CapRadio/Status.md +0 -54
  108. package/CapRadioButton/README.md +0 -152
  109. package/CapRadioButton/Status.md +0 -70
  110. package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
  111. package/CapRadioCard/README.md +0 -161
  112. package/CapRadioCard/Status.md +0 -78
  113. package/CapRadioGroup/README.md +0 -141
  114. package/CapRadioGroup/Status.md +0 -59
  115. package/CapReorderComponent/README.md +0 -179
  116. package/CapReorderComponent/Status.md +0 -41
  117. package/CapRoadMap/README.md +0 -126
  118. package/CapRoadMap/Status.md +0 -53
  119. package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
  120. package/CapRow/README.md +0 -424
  121. package/CapSKUUploader/README.md +0 -189
  122. package/CapSKUUploader/Status.md +0 -66
  123. package/CapSecondaryTopBar/README.md +0 -7
  124. package/CapSelect/README.md +0 -243
  125. package/CapSelectFilter/README.md +0 -121
  126. package/CapShape/README.md +0 -96
  127. package/CapShape/Status.md +0 -36
  128. package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
  129. package/CapSideBar/README.md +0 -298
  130. package/CapSideBar/Status.md +0 -5
  131. package/CapSlideBox/README.md +0 -68
  132. package/CapSlider/README.md +0 -423
  133. package/CapSlider/Status.md +0 -48
  134. package/CapSlider/tests/TEST_COVERAGE.md +0 -118
  135. package/CapSnackBar/README.md +0 -222
  136. package/CapSnackBar/Status.md +0 -41
  137. package/CapSomethingWentWrong/README.md +0 -97
  138. package/CapSplit/README.md +0 -19
  139. package/CapStatisticCard/README.md +0 -138
  140. package/CapStatus/README.md +0 -148
  141. package/CapStatus/Status.md +0 -40
  142. package/CapSteps/Status.md +0 -40
  143. package/CapStepsAccordian/README.md +0 -305
  144. package/CapStepsAccordian/Status.md +0 -48
  145. package/CapSupportVideosWrapper/README.md +0 -14
  146. package/CapSwitch/README.md +0 -351
  147. package/CapTab/README.md +0 -406
  148. package/CapTab/Status.md +0 -104
  149. package/CapTab/tests/USE_CASE_GAPS.md +0 -143
  150. package/CapTabV3/ANALYSIS.md +0 -60
  151. package/CapTabV3/README.md +0 -156
  152. package/CapTabV3/Status.md +0 -52
  153. package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
  154. package/CapTable/README.md +0 -160
  155. package/CapTable/Status.md +0 -41
  156. package/CapTag/README.md +0 -16
  157. package/CapTagDropdown/README.md +0 -171
  158. package/CapTagDropdown/Status.md +0 -55
  159. package/CapTimePicker/README.md +0 -170
  160. package/CapTooltip/README.md +0 -336
  161. package/CapTooltipWithInfo/Status.md +0 -75
  162. package/CapTopBar/README.md +0 -146
  163. package/CapTree/README.md +0 -124
  164. package/CapTree/Status.md +0 -48
  165. package/CapTree/tests/STATUS.md +0 -154
  166. package/CapTreeSelect/README.md +0 -217
  167. package/CapTreeSelect/Status.md +0 -52
  168. package/CapTruncateList/README.md +0 -13
  169. package/CapUnifiedSelect/README.md +0 -40
  170. package/CapUploader/README.md +0 -313
  171. package/CapUploader/Status.md +0 -76
  172. package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
  173. package/CapUserProfile/README.md +0 -105
  174. package/CapUserProfile/Status.md +0 -95
  175. package/CapVirtualList/README.md +0 -162
  176. package/CapVirtualList/Status.md +0 -71
  177. package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
package/CapTab/README.md DELETED
@@ -1,406 +0,0 @@
1
- # CapTab
2
-
3
- Enhanced tab component built on Ant Design v6 with backward compatibility for Ant Design v3/v5 APIs.
4
-
5
- ## Summary of Changes from cap-ui-library
6
-
7
- The `CapTab` component has been migrated from `cap-ui-library` to `blaze-ui` with the following updates:
8
-
9
- - **TypeScript**: Full TypeScript implementation with proper type definitions
10
- - **Ant Design v6**: Updated to use Ant Design v6 APIs while maintaining backward compatibility
11
- - **SCSS Modules**: Uses SCSS modules for styling
12
- - **Enhanced API**: Added support for Ant Design v6 `items` prop pattern
13
- - **Backward Compatible**: All deprecated props from Ant Design v3/v5 still work with console warnings
14
-
15
- ## Props
16
-
17
- ### Supported Props
18
-
19
- The component accepts all Ant Design v6 `Tabs` props, plus the following additions:
20
-
21
- | Prop | Type | Default | Description |
22
- |------|------|---------|-------------|
23
- | `panes` | `TabPaneData[]` | `[]` | Array of tab pane data objects |
24
- | `className` | `string` | - | Custom class name for the tabs wrapper |
25
- | `animated` | `boolean \| { inkBar?: boolean; tabPane?: boolean }` | `true` (except when `type="card"`) | Animation configuration |
26
- | `type` | `'line' \| 'card' \| 'editable-card'` | `'line'` | Tab type |
27
- | `size` | `'large' \| 'middle' \| 'small'` | `'middle'` | Tab size |
28
- | `tabPlacement` | `'top' \| 'end' \| 'bottom' \| 'start'` | - | Tab placement (v6 API) |
29
- | `activeKey` | `string` | - | Active tab key |
30
- | `defaultActiveKey` | `string` | - | Default active tab key |
31
- | `onChange` | `(activeKey: string) => void` | - | Callback when active tab changes |
32
- | `onEdit` | `(targetKey: string, action: 'add' \| 'remove') => void` | - | Callback for editable tabs |
33
-
34
- ### Deprecated Props (Still Supported)
35
-
36
- The following Ant Design component APIs are deprecated but still supported for backward compatibility:
37
-
38
- #### `tabPosition` Prop (Ant Design Tabs Component)
39
-
40
- - **Status:** ⚠️ Deprecated
41
- - **Ant Design Component:** Tabs
42
- - **Deprecated Prop:** `tabPosition`
43
- - **Replacement:** Use `tabPlacement` prop instead
44
- - **Migration:** Replace `tabPosition` with `tabPlacement` and update values (`left` → `start`, `right` → `end`)
45
- - **Removal:** Will be removed in next major version
46
-
47
- **Before (Deprecated):**
48
- ```tsx
49
- import { CapTab } from '@capillarytech/blaze-ui';
50
-
51
- <CapTab
52
- tabPosition="left"
53
- panes={[
54
- { tab: 'Tab 1', content: 'Content 1' },
55
- { tab: 'Tab 2', content: 'Content 2' },
56
- ]}
57
- />
58
- ```
59
-
60
- **After (Recommended):**
61
- ```tsx
62
- import { CapTab } from '@capillarytech/blaze-ui';
63
-
64
- <CapTab
65
- tabPlacement="start"
66
- panes={[
67
- { tab: 'Tab 1', content: 'Content 1' },
68
- { tab: 'Tab 2', content: 'Content 2' },
69
- ]}
70
- />
71
- ```
72
-
73
- **Placement Value Mapping:**
74
- - `left` → `start` (v6 API)
75
- - `right` → `end` (v6 API)
76
- - `top` → `top` (unchanged)
77
- - `bottom` → `bottom` (unchanged)
78
-
79
- **Note:** A deprecation warning will be shown in development mode when using `tabPosition` instead of `tabPlacement`.
80
-
81
- #### `TabPane` Children Pattern (Ant Design Tabs Component)
82
-
83
- - **Status:** ⚠️ Deprecated
84
- - **Ant Design Component:** Tabs
85
- - **Deprecated Pattern:** `TabPane` children pattern (using `<TabPane>` components as children)
86
- - **Replacement:** Use `items` prop (via `panes` prop in CapTab)
87
- - **Migration:** Convert `TabPane` children structure to `panes` array format
88
- - **Removal:** Will be removed in next major version
89
-
90
- **Before (Deprecated in Ant Design v6):**
91
- ```tsx
92
- import { Tabs } from 'antd';
93
- const { TabPane } = Tabs;
94
-
95
- <Tabs>
96
- <TabPane tab="Tab 1" key="1">Content 1</TabPane>
97
- <TabPane tab="Tab 2" key="2">Content 2</TabPane>
98
- </Tabs>
99
- ```
100
-
101
- **After (Recommended):**
102
- ```tsx
103
- import { CapTab } from '@capillarytech/blaze-ui';
104
-
105
- <CapTab
106
- panes={[
107
- { tab: 'Tab 1', key: '1', content: 'Content 1' },
108
- { tab: 'Tab 2', key: '2', content: 'Content 2' },
109
- ]}
110
- />
111
- ```
112
-
113
- **Note:** CapTab internally converts the `panes` prop to Ant Design v6's `items` format. The original component from `cap-ui-library` used the `TabPane` children pattern, which is deprecated in Ant Design v6. The migrated component handles this conversion automatically.
114
-
115
- ## Deprecated APIs Summary
116
-
117
- | Deprecated API | Ant Design Component | Replacement | Removal Version |
118
- |----------------|---------------------|-------------|----------------|
119
- | `tabPosition` prop | Tabs | `tabPlacement` prop | Next major version |
120
- | `TabPane` children pattern | Tabs | `items` prop (via `panes`) | Next major version |
121
-
122
- ## API Changes
123
-
124
- ### Tab Placement (Ant Design Tabs Component)
125
-
126
- **Old API (deprecated):**
127
- ```tsx
128
- <CapTab
129
- tabPosition="left"
130
- panes={[
131
- { tab: 'Tab 1', content: 'Content 1' },
132
- { tab: 'Tab 2', content: 'Content 2' },
133
- ]}
134
- />
135
- ```
136
-
137
- **New API (recommended):**
138
- ```tsx
139
- <CapTab
140
- tabPlacement="start"
141
- panes={[
142
- { tab: 'Tab 1', content: 'Content 1' },
143
- { tab: 'Tab 2', content: 'Content 2' },
144
- ]}
145
- />
146
- ```
147
-
148
- **Placement Value Mapping:**
149
- - `left` → `start` (v6 API)
150
- - `right` → `end` (v6 API)
151
- - `top` → `top` (unchanged)
152
- - `bottom` → `bottom` (unchanged)
153
-
154
- ### TabPane Children Pattern (Ant Design Tabs Component)
155
-
156
- The original component used `TabPane` children pattern, which is deprecated in Ant Design v6. The migrated component handles this internally by converting the `panes` prop to the `items` format required by Ant Design v6.
157
-
158
- **Original Pattern (deprecated in Ant Design v6):**
159
- ```tsx
160
- // This pattern is deprecated in Ant Design v6
161
- <Tabs>
162
- <TabPane tab="Tab 1" key="1">Content 1</TabPane>
163
- <TabPane tab="Tab 2" key="2">Content 2</TabPane>
164
- </Tabs>
165
- ```
166
-
167
- **Current Pattern (recommended):**
168
- ```tsx
169
- // CapTab handles this conversion internally
170
- <CapTab
171
- panes={[
172
- { tab: 'Tab 1', key: '1', content: 'Content 1' },
173
- { tab: 'Tab 2', key: '2', content: 'Content 2' },
174
- ]}
175
- />
176
- ```
177
-
178
- ## Behavioral Changes
179
-
180
- ### No Breaking Changes
181
-
182
- The component maintains **100% backward compatibility** with `cap-ui-library` v8.x. All existing code will continue to work without modifications.
183
-
184
- ### Enhanced Features
185
-
186
- - **Tab Placement**: Support for Ant Design v6 `tabPlacement` API with automatic mapping of deprecated values
187
- - **Items Format**: Internal conversion from `panes` to Ant Design v6 `items` format
188
- - **Animation Configuration**: Enhanced animation API supporting boolean or object configuration
189
- - **Stable Keys**: Automatic key generation for panes without explicit keys
190
-
191
- ## Migration Steps for Consumers
192
-
193
- ### Step 1: Update Imports
194
-
195
- **Before:**
196
- ```tsx
197
- import { CapTab } from '@capillarytech/cap-ui-library';
198
- ```
199
-
200
- **After:**
201
- ```tsx
202
- import { CapTab } from '@capillarytech/blaze-ui';
203
- ```
204
-
205
- ### Step 2: Update Deprecated Props (Optional)
206
-
207
- While deprecated props still work, it's recommended to update them:
208
-
209
- **Before:**
210
- ```tsx
211
- <CapTab
212
- tabPosition="left"
213
- panes={[
214
- { tab: 'Tab 1', content: 'Content 1' },
215
- { tab: 'Tab 2', content: 'Content 2' },
216
- ]}
217
- />
218
- ```
219
-
220
- **After:**
221
- ```tsx
222
- <CapTab
223
- tabPlacement="start"
224
- panes={[
225
- { tab: 'Tab 1', content: 'Content 1' },
226
- { tab: 'Tab 2', content: 'Content 2' },
227
- ]}
228
- />
229
- ```
230
-
231
- ## Code Examples
232
-
233
- ### Basic Usage
234
-
235
- ```tsx
236
- import { CapTab } from '@capillarytech/blaze-ui';
237
-
238
- function MyComponent() {
239
- return (
240
- <CapTab
241
- panes={[
242
- { tab: 'Tab 1', content: 'Content 1' },
243
- { tab: 'Tab 2', content: 'Content 2' },
244
- { tab: 'Tab 3', content: 'Content 3' },
245
- ]}
246
- />
247
- );
248
- }
249
- ```
250
-
251
- ### With Different Tab Types
252
-
253
- ```tsx
254
- // Line tabs (default)
255
- <CapTab type="line" panes={panes} />
256
-
257
- // Card tabs
258
- <CapTab type="card" panes={panes} />
259
-
260
- // Editable card tabs
261
- <CapTab
262
- type="editable-card"
263
- panes={panes}
264
- onEdit={(key, action) => {
265
- if (action === 'add') {
266
- // Handle add
267
- } else {
268
- // Handle remove
269
- }
270
- }}
271
- />
272
- ```
273
-
274
- ### With Different Tab Placements
275
-
276
- ```tsx
277
- // Top (default)
278
- <CapTab tabPlacement="top" panes={panes} />
279
-
280
- // Bottom
281
- <CapTab tabPlacement="bottom" panes={panes} />
282
-
283
- // Start (left)
284
- <CapTab tabPlacement="start" panes={panes} />
285
-
286
- // End (right)
287
- <CapTab tabPlacement="end" panes={panes} />
288
- ```
289
-
290
- ### With Controlled Active Key
291
-
292
- ```tsx
293
- import { useState } from 'react';
294
-
295
- function ControlledExample() {
296
- const [activeKey, setActiveKey] = useState('1');
297
-
298
- return (
299
- <CapTab
300
- activeKey={activeKey}
301
- onChange={setActiveKey}
302
- panes={[
303
- { key: '1', tab: 'Tab 1', content: 'Content 1' },
304
- { key: '2', tab: 'Tab 2', content: 'Content 2' },
305
- ]}
306
- />
307
- );
308
- }
309
- ```
310
-
311
- ### With Disabled Tabs
312
-
313
- ```tsx
314
- <CapTab
315
- panes={[
316
- { tab: 'Tab 1', content: 'Content 1' },
317
- { tab: 'Tab 2', content: 'Content 2', disabled: true },
318
- { tab: 'Tab 3', content: 'Content 3' },
319
- ]}
320
- />
321
- ```
322
-
323
- ### With Custom Tab Content
324
-
325
- ```tsx
326
- <CapTab
327
- panes={[
328
- {
329
- tab: (
330
- <span>
331
- <Icon type="user" /> User Tab
332
- </span>
333
- ),
334
- content: 'User content'
335
- },
336
- {
337
- tab: (
338
- <span>
339
- <Icon type="setting" /> Settings Tab
340
- </span>
341
- ),
342
- content: 'Settings content'
343
- },
344
- ]}
345
- />
346
- ```
347
-
348
- ### With Animation Configuration
349
-
350
- ```tsx
351
- // Disable all animations
352
- <CapTab animated={false} panes={panes} />
353
-
354
- // Enable only ink bar animation
355
- <CapTab animated={{ inkBar: true, tabPane: false }} panes={panes} />
356
-
357
- // Enable only tab pane animation
358
- <CapTab animated={{ inkBar: false, tabPane: true }} panes={panes} />
359
- ```
360
-
361
- ## Import Examples
362
-
363
- ### Default Import
364
-
365
- ```tsx
366
- import CapTab from '@capillarytech/blaze-ui/components/CapTab';
367
- ```
368
-
369
- ### Named Import
370
-
371
- ```tsx
372
- import { CapTab } from '@capillarytech/blaze-ui';
373
- ```
374
-
375
- ### With TypeScript Types
376
-
377
- ```tsx
378
- import { CapTab } from '@capillarytech/blaze-ui';
379
- import type { CapTabProps, TabPaneData } from '@capillarytech/blaze-ui';
380
-
381
- const panes: TabPaneData[] = [
382
- { tab: 'Tab 1', content: 'Content 1' },
383
- { tab: 'Tab 2', content: 'Content 2' },
384
- ];
385
-
386
- const props: CapTabProps = {
387
- panes,
388
- type: 'line',
389
- size: 'middle',
390
- };
391
- ```
392
-
393
- ## Notes
394
-
395
- - **No Breaking Changes**: The component is fully backward compatible with `cap-ui-library` v8.x
396
- - **Deprecated Props**: Deprecated props will show console warnings in development mode but continue to work
397
- - **Tab Placement**: The `tabPosition` prop with values `left`/`right` is automatically mapped to `start`/`end` for Ant Design v6 compatibility
398
- - **Panes Format**: The component internally converts the `panes` prop to Ant Design v6's `items` format
399
- - **Animation**: By default, animations are enabled except when `type="card"` (matching original behavior)
400
- - **Stable Keys**: If panes don't have explicit `key` props, stable keys are generated automatically based on tab content
401
-
402
- ## Related Components
403
-
404
- - `CapButton` - Button component that can be used in tab content
405
- - `CapIcon` - Icon component that can be used in tab labels
406
- - `CapCard` - Card component that can be used in tab content
package/CapTab/Status.md DELETED
@@ -1,104 +0,0 @@
1
- # Migration Status: CapTab
2
-
3
- **Last Updated**: 2026-02-06 17:31:34
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
- - [ ] **Step 9**: CSS Analysis (if mismatches found)
19
- - [ ] **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
- **Status**: ✅ **VERIFIED** - All Ant Design prop changes properly documented
26
-
27
- **Verified Date**: 2026-02-06
28
-
29
- ### Ant Design Components Used
30
- - **Tabs** (`antd-v5` / Ant Design v6)
31
-
32
- ### Deprecated Ant Design Props Documented
33
-
34
- #### 1. `tabPosition` → `tabPlacement` (Ant Design Tabs Component)
35
- - **Status**: ✅ Documented
36
- - **Location**: README.md (lines 38-79), types.ts (line 26)
37
- - **Implementation**:
38
- - ✅ @deprecated JSDoc comment in types.ts
39
- - ✅ Backward compatibility code in index.tsx (mapTabPlacement function)
40
- - ✅ Console warning via logDeprecationWarning
41
- - ✅ Value mapping: `left` → `start`, `right` → `end`
42
- - **Documentation**: Complete with Before/After examples and value mapping table
43
-
44
- #### 2. `TabPane` Children Pattern → `items` Prop (Ant Design Tabs Component)
45
- - **Status**: ✅ Documented
46
- - **Location**: README.md (lines 81-113)
47
- - **Implementation**:
48
- - ✅ Internal conversion from `panes` prop to `items` format
49
- - ✅ Handled automatically in component implementation
50
- - **Documentation**: Complete with Before/After examples explaining the pattern change
51
-
52
- ### Verification Checklist
53
-
54
- - [x] **Ant Design Components Identified**: Tabs component identified
55
- - [x] **MIGRATION_CHANGELOG_TEMPLATE.md Checked**: Referenced for format guidance
56
- - [x] **ANTD_V6_MIGRATION.md Checked**: Confirmed Tabs prop changes match documented patterns
57
- - [x] **README.md Documentation**: Complete "Deprecated Props" section with:
58
- - [x] Status indicators (⚠️ Deprecated)
59
- - [x] Ant Design component identification
60
- - [x] Deprecated prop names
61
- - [x] Replacement prop names
62
- - [x] Migration examples (Before/After)
63
- - [x] Value mapping tables
64
- - [x] Removal version information
65
- - [x] **@deprecated JSDoc Comments**: Present in types.ts for `tabPosition` prop
66
- - [x] **Backward Compatibility**: Implemented with prop mapping and fallback logic
67
- - [x] **Console Warnings**: Implemented via logDeprecationWarning utility
68
- - [x] **Deprecated APIs Summary Table**: Present in README.md (lines 115-120)
69
-
70
- ### Summary
71
-
72
- All Ant Design component prop changes for CapTab have been properly documented and implemented:
73
- - ✅ Both deprecated Ant Design props (`tabPosition` and `TabPane` pattern) are documented
74
- - ✅ Documentation follows the format from MIGRATION_CHANGELOG_TEMPLATE.md and ANTD_V6_MIGRATION.md
75
- - ✅ Backward compatibility is maintained with console warnings
76
- - ✅ Migration examples are provided for each deprecated prop
77
- - ✅ All deprecated props clearly indicate which Ant Design component they belong to
78
-
79
- **Note**: Step 2.5 is REQUIRED and enforced.
80
- - Focus: **Ant Design component prop changes** (e.g., Dropdown, Input, Alert, Tooltip, etc.)
81
- - Reference: MIGRATION_CHANGELOG_TEMPLATE.md for format, ANTD_V6_MIGRATION.md for Ant Design deprecated APIs
82
- - Skip: If original component doesn't exist in cap-ui-library
83
- - All deprecated Ant Design props and prop changes must be documented before proceeding.
84
-
85
- ## Visual Testing Results
86
-
87
- **Last Test**: 2026-02-06 17:29:59
88
- **Maximum Mismatch**: 2.41%
89
-
90
- ### Mismatched Variants:
91
- - default:1.99%
92
- - selected:2.02%
93
- - disabled-tabs:2.41%
94
- - tab-switch (with 2 interactions):1.89%
95
-
96
-
97
- ## CSS Fixes Applied
98
-
99
- _No CSS fixes applied yet._
100
-
101
- ## Notes
102
-
103
- _No notes yet._
104
-
@@ -1,143 +0,0 @@
1
- # CapTab Use Case Gaps Analysis
2
-
3
- ## Phase 0: Google Sheets Access
4
-
5
- **Status**: ⚠️ **Unable to access Google Sheets**
6
-
7
- - MCP Server `google_sheets` was not available
8
- - Spreadsheet ID: `1Xt8l8Q6Hw0cUYV65SlGvGcPnOtzprr0fukDR9UWJ3kg`
9
- - Tab: `CapTab`
10
-
11
- **Action Required**: Manual review of Google Sheets to compare use cases against component implementation.
12
-
13
- **Note**: Tests were created based on component implementation analysis, existing Storybook stories, and standard tab component requirements.
14
-
15
- ---
16
-
17
- ## Phase 2: Test Implementation
18
-
19
- **Status**: ✅ **Complete & Optimized**
20
-
21
- **Test Coverage**: Comprehensive unit tests implemented covering:
22
- - Default rendering and initialization
23
- - Prop variations (types, sizes, placements, animations) - consolidated with `it.each`
24
- - User interactions (click, keyboard navigation, focus) - consolidated with `it.each`
25
- - Callbacks and event handlers
26
- - Edge cases (empty states, null/undefined values, ReactNode handling) - consolidated
27
- - Accessibility (ARIA attributes, keyboard navigation)
28
- - Backward compatibility (deprecated props)
29
- - Data flow and state management
30
- - Conditional rendering logic - consolidated with `it.each`
31
- - Key generation for panes without explicit keys (including ReactNode edge cases)
32
- - Wrapper structure and CSS classes
33
- - Animation config edge cases
34
- - mapTabPlacement edge cases
35
-
36
- **Optimizations Applied**:
37
- - Removed duplicate tests (consolidated ~159 tests to ~102 tests)
38
- - Used `it.each` for repetitive test patterns
39
- - Consolidated similar edge case tests
40
- - Added missing coverage for key generation edge cases (ReactNode without children, minimal panes)
41
- - Improved test maintainability and readability
42
-
43
- ---
44
-
45
- ## Phase 1: Use Cases NOT Fulfilled by CapTab
46
-
47
- Based on component analysis, the following use cases are **NOT** currently supported:
48
-
49
- ### 1. **Loading States**
50
- - ❌ **Loading indicator**: No loading state for tabs or tab content
51
- - ❌ **Skeleton loading**: No skeleton/placeholder while content loads
52
- - ❌ **Async content loading**: No built-in support for lazy loading tab content
53
-
54
- ### 2. **Error States**
55
- - ❌ **Error handling**: No error state display for failed tab content
56
- - ❌ **Error boundaries**: No error boundary integration for tab panes
57
- - ❌ **Retry mechanisms**: No retry functionality for failed content
58
-
59
- ### 3. **Empty States**
60
- - ❌ **Custom empty state**: No custom empty state message when panes array is empty
61
- - ❌ **Empty tab content**: No empty state for individual tab panes with no content
62
- - ❌ **Empty state callbacks**: No callback when empty state is displayed
63
-
64
- ### 4. **Advanced Interactions**
65
- - ❌ **Drag and drop**: No ability to reorder tabs via drag and drop
66
- - ❌ **Tab closing**: No built-in close button for tabs (except editable-card type)
67
- - ❌ **Tab duplication**: No ability to duplicate tabs
68
- - ❌ **Tab context menu**: No right-click context menu for tabs
69
- - ❌ **Tab tooltips**: No tooltip support for tab labels
70
-
71
- ### 5. **Customization**
72
- - ❌ **Custom tab icons**: No built-in icon prop support (requires ReactNode)
73
- - ❌ **Tab badges/notifications**: No badge or notification count display
74
- - ❌ **Custom tab styling per pane**: All tabs use same styling
75
- - ❌ **Tab width customization**: No per-tab width control
76
- - ❌ **Tab alignment options**: Limited alignment options beyond centered
77
-
78
- ### 6. **Data Features**
79
- - ❌ **Tab persistence**: No localStorage/sessionStorage persistence
80
- - ❌ **Tab state management**: No built-in state management integration
81
- - ❌ **Tab analytics**: No analytics/tracking hooks
82
- - ❌ **Tab validation**: No validation before tab switch
83
- - ❌ **Tab dependencies**: No way to show/enforce tab dependencies
84
-
85
- ### 7. **Accessibility Enhancements**
86
- - ❌ **Custom ARIA labels**: No per-tab ARIA label customization
87
- - ❌ **Screen reader announcements**: No custom announcements for tab changes
88
- - ❌ **Focus management**: Limited focus management options
89
- - ❌ **Skip links**: No skip-to-content links
90
-
91
- ### 8. **Performance Features**
92
- - ❌ **Lazy loading**: No lazy loading for tab content
93
- - ❌ **Virtual scrolling**: No virtual scrolling for many tabs
94
- - ❌ **Content preloading**: No preloading for adjacent tabs
95
- - ❌ **Memoization helpers**: No built-in memoization for tab content
96
-
97
- ### 9. **Integration Features**
98
- - ❌ **URL synchronization**: No URL hash/query param sync
99
- - ❌ **Router integration**: No direct router integration
100
- - ❌ **Form integration**: No form state preservation across tabs
101
- - ❌ **Multi-tab selection**: No multi-select mode
102
-
103
- ### 10. **Developer Experience**
104
- - ❌ **Tab refs**: No ref forwarding for individual tabs
105
- - ❌ **Tab lifecycle hooks**: No onMount/onUnmount callbacks per tab
106
- - ❌ **Tab validation callbacks**: No beforeChange validation
107
- - ❌ **Tab animation callbacks**: No animation start/end callbacks
108
-
109
- ---
110
-
111
- ## Component Capabilities (Verified)
112
-
113
- ### ✅ **Supported Features**:
114
- - ✅ Basic tab rendering with panes prop
115
- - ✅ Multiple tab types (line, card, editable-card)
116
- - ✅ Tab sizes (small, middle, large)
117
- - ✅ Tab placements (top, bottom, start, end)
118
- - ✅ Controlled and uncontrolled modes
119
- - ✅ Disabled tabs
120
- - ✅ Custom className
121
- - ✅ Animation configuration (boolean or object)
122
- - ✅ ReactNode support for tab labels and content
123
- - ✅ Backward compatibility with deprecated props
124
- - ✅ onChange callback for tab switching
125
- - ✅ onEdit callback for editable-card type
126
- - ✅ Stable key generation for panes without keys
127
- - ✅ All Ant Design Tabs props via rest spread
128
-
129
- ---
130
-
131
- ## Recommendations
132
-
133
- 1. **High Priority**: Add loading states and error handling for better UX
134
- 2. **Medium Priority**: Add URL synchronization and router integration
135
- 3. **Low Priority**: Add advanced features like drag-and-drop and tab badges
136
-
137
- ---
138
-
139
- ## Notes
140
-
141
- - Component is a wrapper around Ant Design v6 Tabs
142
- - Most missing features can be implemented by consumers using Ant Design props
143
- - Focus should be on features that require component-level logic