@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.
Files changed (189) hide show
  1. package/CapAskAira/CapAiMediaGeneration/saga.js +1446 -0
  2. package/CapAskAira/CapAiMediaGeneration/saga.js.map +1 -0
  3. package/CapCollapsibleLeftNavigation/saga.js +1441 -0
  4. package/CapCollapsibleLeftNavigation/saga.js.map +1 -0
  5. package/CapLanguageProvider/actions.js +125 -0
  6. package/CapLanguageProvider/actions.js.map +1 -0
  7. package/CapLanguageProvider/constants.js +37 -0
  8. package/CapLanguageProvider/constants.js.map +1 -0
  9. package/CapLanguageProvider/reducer.js +130 -0
  10. package/CapLanguageProvider/reducer.js.map +1 -0
  11. package/CapLanguageProvider/saga.js +1457 -0
  12. package/CapLanguageProvider/saga.js.map +1 -0
  13. package/CapLanguageProvider/selector.js +186 -0
  14. package/CapLanguageProvider/selector.js.map +1 -0
  15. package/CapSupportVideosWrapper/utils.js +34 -0
  16. package/CapSupportVideosWrapper/utils.js.map +1 -0
  17. package/package.json +1 -1
  18. package/CapActionBar/README.md +0 -11
  19. package/CapAdvancedIcon/README.md +0 -185
  20. package/CapAdvancedIcon/use-cases.md +0 -44
  21. package/CapAlert/README.md +0 -144
  22. package/CapAppNotEnabled/README.md +0 -84
  23. package/CapAskAira/README.md +0 -328
  24. package/CapBanner/README.md +0 -4
  25. package/CapBlock/README.md +0 -175
  26. package/CapBorderedBox/Status.md +0 -40
  27. package/CapCSVFileUploader/README.md +0 -124
  28. package/CapCSVFileUploader/Status.md +0 -47
  29. package/CapCard/README.md +0 -85
  30. package/CapCard/Status.md +0 -41
  31. package/CapCardBox/README.md +0 -169
  32. package/CapCardBox/Status.md +0 -52
  33. package/CapCarousel/README.md +0 -190
  34. package/CapCarousel/Status.md +0 -73
  35. package/CapCheckbox/README.md +0 -254
  36. package/CapCheckbox/Status.md +0 -41
  37. package/CapColorPicker/README.md +0 -112
  38. package/CapColorPicker/Status.md +0 -52
  39. package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
  40. package/CapColoredTag/README.md +0 -167
  41. package/CapColoredTag/Status.md +0 -49
  42. package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
  43. package/CapConditionPreview/README.md +0 -40
  44. package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
  45. package/CapCustomCard/README.md +0 -182
  46. package/CapCustomCard/Status.md +0 -40
  47. package/CapCustomCarousel/Status.md +0 -69
  48. package/CapCustomCheckboxList/README.md +0 -178
  49. package/CapCustomCheckboxList/Status.md +0 -52
  50. package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
  51. package/CapCustomList/README.md +0 -117
  52. package/CapCustomList/Status.md +0 -77
  53. package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
  54. package/CapCustomSelect/README.md +0 -38
  55. package/CapDatePicker/README.md +0 -139
  56. package/CapDateRangePicker/README.md +0 -159
  57. package/CapDateTimePicker/README.md +0 -136
  58. package/CapDateTimeRangePicker/README.md +0 -243
  59. package/CapDivider/README.md +0 -122
  60. package/CapDrawer/README.md +0 -207
  61. package/CapDrawer/Status.md +0 -52
  62. package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
  63. package/CapDropdown/README.md +0 -515
  64. package/CapDropdown/Status.md +0 -45
  65. package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
  66. package/CapError/README.md +0 -88
  67. package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
  68. package/CapErrorBoundary/README.md +0 -150
  69. package/CapErrorStateIllustration/README.md +0 -222
  70. package/CapErrorStateIllustration/USE_CASES.md +0 -33
  71. package/CapExpressionEditor/README.md +0 -32
  72. package/CapForm/README.md +0 -132
  73. package/CapForm/Status.md +0 -40
  74. package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
  75. package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
  76. package/CapFormItem/README.md +0 -320
  77. package/CapFormItem/Status.md +0 -73
  78. package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
  79. package/CapGraph/README.md +0 -69
  80. package/CapGraph/USE_CASES.md +0 -66
  81. package/CapHamburgerMenu/README.md +0 -234
  82. package/CapHamburgerMenu/USE_CASES.md +0 -48
  83. package/CapHeader/Status.md +0 -41
  84. package/CapHeading/README.md +0 -220
  85. package/CapHeading/Status.md +0 -41
  86. package/CapIcon/README.md +0 -207
  87. package/CapIllustration/Status.md +0 -41
  88. package/CapImage/README.md +0 -50
  89. package/CapImportMFEComponent/README.md +0 -121
  90. package/CapInfoNote/Status.md +0 -40
  91. package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
  92. package/CapInput/README.md +0 -196
  93. package/CapInput/Status.md +0 -123
  94. package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
  95. package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
  96. package/CapLanguageProvider/README.md +0 -206
  97. package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
  98. package/CapLevelGraphRenderer/README.md +0 -123
  99. package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
  100. package/CapLink/README.md +0 -203
  101. package/CapLink/Status.md +0 -32
  102. package/CapLink/tests/CapLink.missingUseCases.md +0 -95
  103. package/CapList/README.md +0 -129
  104. package/CapList/Status.md +0 -69
  105. package/CapListLayout/README.md +0 -7
  106. package/CapLogin/README.md +0 -7
  107. package/CapMenu/README.md +0 -86
  108. package/CapModal/README.md +0 -357
  109. package/CapModal/Status.md +0 -52
  110. package/CapModal/tests/USE_CASES_GAPS.md +0 -207
  111. package/CapMultiSelect/README.md +0 -170
  112. package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
  113. package/CapMultiSelectDatePicker/README.md +0 -11
  114. package/CapNavigation/README.md +0 -72
  115. package/CapNotification/README.md +0 -228
  116. package/CapNotificationDropdown/README.md +0 -5
  117. package/CapPopover/README.md +0 -234
  118. package/CapProgress/Status.md +0 -40
  119. package/CapRadio/Status.md +0 -54
  120. package/CapRadioButton/README.md +0 -152
  121. package/CapRadioButton/Status.md +0 -70
  122. package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
  123. package/CapRadioCard/README.md +0 -161
  124. package/CapRadioCard/Status.md +0 -78
  125. package/CapRadioGroup/README.md +0 -141
  126. package/CapRadioGroup/Status.md +0 -59
  127. package/CapReorderComponent/README.md +0 -179
  128. package/CapReorderComponent/Status.md +0 -41
  129. package/CapRoadMap/README.md +0 -126
  130. package/CapRoadMap/Status.md +0 -53
  131. package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
  132. package/CapRow/README.md +0 -424
  133. package/CapSKUUploader/README.md +0 -189
  134. package/CapSKUUploader/Status.md +0 -66
  135. package/CapSecondaryTopBar/README.md +0 -7
  136. package/CapSelect/README.md +0 -243
  137. package/CapSelectFilter/README.md +0 -121
  138. package/CapShape/README.md +0 -96
  139. package/CapShape/Status.md +0 -36
  140. package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
  141. package/CapSideBar/README.md +0 -298
  142. package/CapSideBar/Status.md +0 -5
  143. package/CapSlideBox/README.md +0 -68
  144. package/CapSlider/README.md +0 -423
  145. package/CapSlider/Status.md +0 -48
  146. package/CapSlider/tests/TEST_COVERAGE.md +0 -118
  147. package/CapSnackBar/README.md +0 -222
  148. package/CapSnackBar/Status.md +0 -41
  149. package/CapSomethingWentWrong/README.md +0 -97
  150. package/CapSplit/README.md +0 -19
  151. package/CapStatisticCard/README.md +0 -138
  152. package/CapStatus/README.md +0 -148
  153. package/CapStatus/Status.md +0 -40
  154. package/CapSteps/Status.md +0 -40
  155. package/CapStepsAccordian/README.md +0 -305
  156. package/CapStepsAccordian/Status.md +0 -48
  157. package/CapSupportVideosWrapper/README.md +0 -14
  158. package/CapSwitch/README.md +0 -351
  159. package/CapTab/README.md +0 -406
  160. package/CapTab/Status.md +0 -104
  161. package/CapTab/tests/USE_CASE_GAPS.md +0 -143
  162. package/CapTabV3/ANALYSIS.md +0 -60
  163. package/CapTabV3/README.md +0 -156
  164. package/CapTabV3/Status.md +0 -52
  165. package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
  166. package/CapTable/README.md +0 -160
  167. package/CapTable/Status.md +0 -41
  168. package/CapTag/README.md +0 -16
  169. package/CapTagDropdown/README.md +0 -171
  170. package/CapTagDropdown/Status.md +0 -55
  171. package/CapTimePicker/README.md +0 -170
  172. package/CapTooltip/README.md +0 -336
  173. package/CapTooltipWithInfo/Status.md +0 -75
  174. package/CapTopBar/README.md +0 -146
  175. package/CapTree/README.md +0 -124
  176. package/CapTree/Status.md +0 -48
  177. package/CapTree/tests/STATUS.md +0 -154
  178. package/CapTreeSelect/README.md +0 -217
  179. package/CapTreeSelect/Status.md +0 -52
  180. package/CapTruncateList/README.md +0 -13
  181. package/CapUnifiedSelect/README.md +0 -40
  182. package/CapUploader/README.md +0 -313
  183. package/CapUploader/Status.md +0 -76
  184. package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
  185. package/CapUserProfile/README.md +0 -105
  186. package/CapUserProfile/Status.md +0 -95
  187. package/CapVirtualList/README.md +0 -162
  188. package/CapVirtualList/Status.md +0 -71
  189. package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
@@ -1,423 +0,0 @@
1
- # CapSlider
2
-
3
- A slider component built on Ant Design v6 with Capillary-specific styling and custom tip formatter support.
4
-
5
- ## Summary of Changes from cap-ui-library
6
-
7
- The `CapSlider` 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
- - **Functional Component**: Converted from class component to functional component
12
- - **SCSS Modules**: Converted from regular SCSS to SCSS modules
13
- - **Theme Tokens**: Migrated color overrides to Ant Design theme tokens
14
- - **Backward Compatible**: All deprecated props from Ant Design v3 still work with console warnings
15
-
16
- ## Breaking Changes
17
-
18
- **No breaking changes from cap-ui-library v8.x**
19
-
20
- The component maintains backward compatibility with deprecated props. However, deprecated props will show console warnings in development mode and should be migrated to the new API.
21
-
22
- ## Prop Changes
23
-
24
- ### New Props (v6 API)
25
-
26
- | Prop | Type | Default | Description |
27
- |------|------|---------|-------------|
28
- | `tooltip` | `{ formatter?: (value?: number) => React.ReactNode, ... }` | `undefined` | Tooltip configuration object (v6 API) |
29
-
30
- ### Deprecated Props (Still Supported)
31
-
32
- The following props are deprecated but still work for backward compatibility. They will show console warnings in development mode:
33
-
34
- #### Ant Design Slider Component Props
35
-
36
- These props are deprecated Ant Design `Slider` component props that have been replaced in v6:
37
-
38
- | Deprecated Prop | Type | Status | Replacement | Ant Design Component |
39
- |----------------|------|--------|-------------|---------------------|
40
- | `tipFormatter` | `((value?: number) => React.ReactNode) \| null` | ⚠️ Deprecated | Use `tooltip.formatter` instead | Slider |
41
- | `tooltipPlacement` | `string` | ⚠️ Deprecated | Use `tooltip.placement` instead | Slider |
42
- | `tooltipVisible` | `boolean` | ⚠️ Deprecated | Use `tooltip.open` instead | Slider |
43
- | `tooltipPrefixCls` | `string` | ⚠️ Deprecated | Use `tooltip.prefixCls` instead | Slider |
44
-
45
- **Reference**: These deprecations follow Ant Design v6 migration patterns documented in `ANTD_V6_MIGRATION.md` and `MIGRATION_CHANGELOG_TEMPLATE.md`.
46
-
47
- #### Cap Component Props
48
-
49
- | Deprecated Prop | Type | Status | Replacement | Notes |
50
- |----------------|------|--------|-------------|-------|
51
- | `type` | `'ratio' \| string` | ⚠️ Deprecated | Use `tooltip.formatter` instead | Cap-specific convenience prop |
52
-
53
- **Note**: Deprecated props will be removed in v10.0.0. Please migrate to the new prop names.
54
-
55
- ### Other Props
56
-
57
- | Prop | Type | Default | Description |
58
- |------|------|---------|-------------|
59
- | `value` | `number \| [number, number]` | `undefined` | Current value (controlled mode) |
60
- | `defaultValue` | `number \| [number, number]` | `undefined` | Default value (uncontrolled mode) |
61
- | `min` | `number` | `0` | Minimum value |
62
- | `max` | `number` | `100` | Maximum value |
63
- | `step` | `number \| null` | `1` | Step value |
64
- | `marks` | `Record<number, React.ReactNode>` | `undefined` | Marks on the slider |
65
- | `range` | `boolean` | `false` | Whether to use range slider |
66
- | `disabled` | `boolean` | `false` | Whether slider is disabled |
67
- | `vertical` | `boolean` | `false` | Whether slider is vertical |
68
- | `reverse` | `boolean` | `false` | Whether to reverse slider |
69
- | `included` | `boolean` | `true` | Whether marks are included in track |
70
- | `onChange` | `(value: number \| [number, number]) => void` | `undefined` | Callback when value changes |
71
- | `onAfterChange` | `(value: number \| [number, number]) => void` | `undefined` | Callback after value changes |
72
- | `sliderRaleColor` | `string` | `undefined` | Whether to apply slider rail color styling (note: typo preserved for backward compatibility) |
73
- | `className` | `string` | `undefined` | Additional CSS class name |
74
- | `children` | `React.ReactNode` | `undefined` | Slider children (marks or custom elements) |
75
-
76
- **Note**: The component accepts all other Ant Design v6 `Slider` props. See [Ant Design Slider documentation](https://ant.design/components/slider) for complete prop list.
77
-
78
- ## API Changes
79
-
80
- ### Ant Design Slider Component Prop Changes (v6 API)
81
-
82
- In Ant Design v6, several Slider component props have been consolidated into a `tooltip` object prop:
83
-
84
- #### tipFormatter → tooltip.formatter
85
-
86
- **Before (deprecated):**
87
- ```tsx
88
- <CapSlider
89
- tipFormatter={(value) => `${value}%`}
90
- defaultValue={50}
91
- />
92
- ```
93
-
94
- **After (recommended):**
95
- ```tsx
96
- <CapSlider
97
- tooltip={{ formatter: (value) => `${value}%` }}
98
- defaultValue={50}
99
- />
100
- ```
101
-
102
- #### tooltipPlacement → tooltip.placement
103
-
104
- **Before (deprecated):**
105
- ```tsx
106
- <CapSlider
107
- tipFormatter={(value) => `${value}%`}
108
- tooltipPlacement="top"
109
- defaultValue={50}
110
- />
111
- ```
112
-
113
- **After (recommended):**
114
- ```tsx
115
- <CapSlider
116
- tooltip={{
117
- formatter: (value) => `${value}%`,
118
- placement: 'top'
119
- }}
120
- defaultValue={50}
121
- />
122
- ```
123
-
124
- #### tooltipVisible → tooltip.open
125
-
126
- **Before (deprecated):**
127
- ```tsx
128
- <CapSlider
129
- tipFormatter={(value) => `${value}%`}
130
- tooltipVisible={true}
131
- defaultValue={50}
132
- />
133
- ```
134
-
135
- **After (recommended):**
136
- ```tsx
137
- <CapSlider
138
- tooltip={{
139
- formatter: (value) => `${value}%`,
140
- open: true
141
- }}
142
- defaultValue={50}
143
- />
144
- ```
145
-
146
- #### tooltipPrefixCls → tooltip.prefixCls
147
-
148
- **Before (deprecated):**
149
- ```tsx
150
- <CapSlider
151
- tipFormatter={(value) => `${value}%`}
152
- tooltipPrefixCls="custom-tooltip"
153
- defaultValue={50}
154
- />
155
- ```
156
-
157
- **After (recommended):**
158
- ```tsx
159
- <CapSlider
160
- tooltip={{
161
- formatter: (value) => `${value}%`,
162
- prefixCls: 'custom-tooltip'
163
- }}
164
- defaultValue={50}
165
- />
166
- ```
167
-
168
- ### Cap Component Prop Changes
169
-
170
- #### Type Prop Migration
171
-
172
- The `type` prop was a Cap-specific convenience prop that translated to `tipFormatter`. It's now deprecated:
173
-
174
- **Before (deprecated):**
175
- ```tsx
176
- <CapSlider
177
- type="ratio"
178
- defaultValue={30}
179
- />
180
- ```
181
-
182
- **After (recommended):**
183
- ```tsx
184
- <CapSlider
185
- tooltip={{ formatter: (value) => value !== undefined ? `${value} | ${100 - value}` : '' }}
186
- defaultValue={30}
187
- />
188
- ```
189
-
190
- ## Backward Compatibility
191
-
192
- The component maintains backward compatibility for deprecated props:
193
-
194
- ### Ant Design Slider Component Props
195
-
196
- - **`tipFormatter` prop**: Still works but logs a deprecation warning in development. Use `tooltip.formatter` instead.
197
- - **`tooltipPlacement` prop**: Still works but is deprecated. Use `tooltip.placement` instead.
198
- - **`tooltipVisible` prop**: Still works but is deprecated. Use `tooltip.open` instead.
199
- - **`tooltipPrefixCls` prop**: Still works but is deprecated. Use `tooltip.prefixCls` instead.
200
-
201
- **Note**: Deprecated Ant Design Slider props (`tooltipPlacement`, `tooltipVisible`, `tooltipPrefixCls`) are passed directly to the underlying Ant Design `Slider` component. Ant Design v6 may still accept these props but they are deprecated and should be migrated to the `tooltip` object API.
202
-
203
- ### Cap Component Props
204
-
205
- - **`type` prop**: Still works but logs a deprecation warning in development. Use `tooltip.formatter` instead.
206
-
207
- **Note**: If both `tooltip.formatter` and `tipFormatter` are provided, `tooltip.formatter` takes precedence. If `type` is provided, it will be translated to a formatter function and used if no other formatter is specified.
208
-
209
- ## Code Examples
210
-
211
- ### Basic Usage
212
-
213
- ```tsx
214
- import { CapSlider } from '@capillarytech/blaze-ui';
215
-
216
- function MyComponent() {
217
- const [value, setValue] = useState(50);
218
-
219
- return (
220
- <CapSlider
221
- value={value}
222
- onChange={setValue}
223
- />
224
- );
225
- }
226
- ```
227
-
228
- ### Uncontrolled Mode
229
-
230
- ```tsx
231
- <CapSlider
232
- defaultValue={30}
233
- onChange={(value) => {
234
- console.log('Slider value:', value);
235
- }}
236
- />
237
- ```
238
-
239
- ### Range Slider
240
-
241
- ```tsx
242
- <CapSlider
243
- range
244
- defaultValue={[20, 80]}
245
- onChange={(values) => {
246
- console.log('Range:', values);
247
- }}
248
- />
249
- ```
250
-
251
- ### With Marks
252
-
253
- ```tsx
254
- <CapSlider
255
- marks={{
256
- 0: '0°C',
257
- 26: '26°C',
258
- 37: '37°C',
259
- 100: '100°C',
260
- }}
261
- defaultValue={26}
262
- />
263
- ```
264
-
265
- ### Custom Tooltip Formatter (v6 API)
266
-
267
- ```tsx
268
- <CapSlider
269
- tooltip={{
270
- formatter: (value) => value !== undefined ? `$${value}` : ''
271
- }}
272
- defaultValue={50}
273
- />
274
- ```
275
-
276
- ### Ratio Type (Deprecated - Use tooltip.formatter instead)
277
-
278
- ```tsx
279
- // ⚠️ Deprecated but still works
280
- <CapSlider
281
- type="ratio"
282
- defaultValue={30}
283
- />
284
-
285
- // ✅ Recommended
286
- <CapSlider
287
- tooltip={{
288
- formatter: (value) => value !== undefined ? `${value} | ${100 - value}` : ''
289
- }}
290
- defaultValue={30}
291
- />
292
- ```
293
-
294
- ### With Custom Rail Color
295
-
296
- ```tsx
297
- <CapSlider
298
- sliderRaleColor="custom"
299
- defaultValue={50}
300
- />
301
- ```
302
-
303
- ### Disabled State
304
-
305
- ```tsx
306
- <CapSlider
307
- defaultValue={50}
308
- disabled
309
- />
310
- ```
311
-
312
- ### Vertical Slider
313
-
314
- ```tsx
315
- <CapSlider
316
- vertical
317
- defaultValue={50}
318
- style={{ height: 200 }}
319
- />
320
- ```
321
-
322
- ### With Step
323
-
324
- ```tsx
325
- <CapSlider
326
- step={10}
327
- defaultValue={30}
328
- />
329
- ```
330
-
331
- ## Migration Steps for Consumers
332
-
333
- ### Step 1: Update Imports
334
-
335
- **Before:**
336
- ```tsx
337
- import { CapSlider } from '@capillarytech/cap-ui-library';
338
- ```
339
-
340
- **After:**
341
- ```tsx
342
- import { CapSlider } from '@capillarytech/blaze-ui';
343
- ```
344
-
345
- ### Step 2: Update Tooltip Configuration (If Using tipFormatter or type)
346
-
347
- **Before:**
348
- ```tsx
349
- <CapSlider
350
- tipFormatter={(value) => `${value}%`}
351
- defaultValue={50}
352
- />
353
-
354
- // or
355
-
356
- <CapSlider
357
- type="ratio"
358
- defaultValue={30}
359
- />
360
- ```
361
-
362
- **After:**
363
- ```tsx
364
- <CapSlider
365
- tooltip={{ formatter: (value) => `${value}%` }}
366
- defaultValue={50}
367
- />
368
-
369
- // or for ratio type
370
-
371
- <CapSlider
372
- tooltip={{
373
- formatter: (value) => value !== undefined ? `${value} | ${100 - value}` : ''
374
- }}
375
- defaultValue={30}
376
- />
377
- ```
378
-
379
- ### Step 3: No Other Changes Required
380
-
381
- All other props and usage patterns remain the same. The component is fully backward compatible.
382
-
383
- ## Import Examples
384
-
385
- ### Default Import
386
-
387
- ```tsx
388
- import CapSlider from '@capillarytech/blaze-ui/components/CapSlider';
389
- ```
390
-
391
- ### Named Import
392
-
393
- ```tsx
394
- import { CapSlider } from '@capillarytech/blaze-ui';
395
- ```
396
-
397
- ### With TypeScript Types
398
-
399
- ```tsx
400
- import { CapSlider } from '@capillarytech/blaze-ui';
401
- import type { CapSliderProps } from '@capillarytech/blaze-ui';
402
-
403
- const props: CapSliderProps = {
404
- defaultValue: 50,
405
- min: 0,
406
- max: 100,
407
- };
408
- ```
409
-
410
- ## Notes
411
-
412
- - **No Breaking Changes**: The component is fully backward compatible with `cap-ui-library` v8.x
413
- - **Deprecated Ant Design Slider Props**: The following Ant Design `Slider` component props are deprecated: `tipFormatter`, `tooltipPlacement`, `tooltipVisible`, `tooltipPrefixCls`. These should be migrated to the `tooltip` object API (e.g., `tooltip.formatter`, `tooltip.placement`, `tooltip.open`, `tooltip.prefixCls`). They will be removed in Ant Design v7.
414
- - **Deprecated Cap Props**: `type` prop is deprecated but still supported. It will be removed in v10.0.0.
415
- - **Tooltip Configuration**: In Ant Design v6, tooltip configuration moved to a `tooltip` object prop. See [Ant Design Slider documentation](https://ant.design/components/slider) for complete `tooltip` API.
416
- - **Rail Color**: The `sliderRaleColor` prop name contains a typo but is preserved for backward compatibility
417
- - **Styling**: Uses SCSS modules with theme tokens for colors and custom CSS for dimensions/positioning
418
-
419
- ## Related Components
420
-
421
- - `CapInput` - Input component for numeric values
422
- - `CapInputNumber` - Number input component
423
- - `CapSwitch` - Switch component for boolean toggles
@@ -1,48 +0,0 @@
1
- # Migration Status: CapSlider
2
-
3
- **Last Updated**: 2026-02-04 09:56:53
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
- _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-04 09:56:53
36
- **Maximum Mismatch**: 8.33%
37
-
38
- ### Mismatched Variants:
39
- - tooltip-hover (with 3 interactions):8.33%
40
-
41
-
42
- ## CSS Fixes Applied
43
-
44
- _No CSS fixes applied yet._
45
-
46
- ## Notes
47
-
48
- _No notes yet._
@@ -1,118 +0,0 @@
1
- # CapSlider Test Coverage Summary
2
-
3
- ## Phase 0: Use Cases Extraction
4
- **Status**: ⚠️ **Could not access Google Sheets MCP server**
5
- - Attempted to access spreadsheet via `google_sheets` MCP server
6
- - Server was not available/configured
7
- - Tests were created based on component code, README, and Storybook stories
8
-
9
- ## Phase 1: Missing Use Cases Analysis
10
- **Status**: ⚠️ **Cannot determine without Google Sheets data**
11
-
12
- Without access to the use cases spreadsheet, I cannot identify specific use cases the component is NOT fulfilling. However, based on the component implementation review:
13
-
14
- ### Component Capabilities (Verified):
15
- - ✅ Single and range slider modes
16
- - ✅ Controlled and uncontrolled modes
17
- - ✅ Custom min/max/step values
18
- - ✅ Marks/labels support
19
- - ✅ Tooltip formatters (v6 API and deprecated)
20
- - ✅ Disabled, vertical, reverse, included props
21
- - ✅ Backward compatibility for deprecated props
22
- - ✅ Custom className and styling
23
- - ✅ Children support
24
-
25
- ### Potential Gaps (Requires Google Sheets verification):
26
- - Unknown: Specific business use cases from spreadsheet
27
- - Unknown: Edge cases or requirements not in standard Ant Design Slider API
28
-
29
- ## Phase 2: Test Implementation
30
- **Status**: ✅ **Complete**
31
-
32
- ### Test File Structure:
33
- ```
34
- components/CapSlider/tests/
35
- ├── CapSlider.test.tsx (Main test file)
36
- └── CapSlider.mockData.ts (Mock data and helpers)
37
- ```
38
-
39
- ### Test Coverage Areas:
40
-
41
- 1. **Default rendering and initialization** ✅
42
- - Basic rendering
43
- - DisplayName verification
44
- - Default value handling
45
-
46
- 2. **Prop variations** ✅
47
- - Value and defaultValue (single and range)
48
- - Min, max, step values
49
- - Range, disabled, vertical, reverse, included
50
- - Marks with custom labels
51
- - Tooltip formatters (v6 API)
52
- - Deprecated props (tipFormatter, type)
53
- - className and sliderRaleColor
54
- - Children support
55
-
56
- 3. **User interactions** ✅
57
- - onChange callback acceptance
58
- - onAfterChange callback acceptance
59
- - Range slider callbacks
60
-
61
- 4. **Edge cases** ✅
62
- - Empty/null values
63
- - Boundary values (min/max)
64
- - Step edge cases (null, very small, large)
65
- - Undefined values
66
-
67
- 5. **Accessibility** ✅
68
- - Slider role verification
69
- - Disabled state accessibility
70
- - Focusable elements
71
-
72
- 6. **Backward compatibility** ✅
73
- - Deprecated tipFormatter prop
74
- - Deprecated type prop
75
- - Prop priority (tooltip.formatter > tipFormatter > type)
76
- - Deprecation warnings in development
77
-
78
- 7. **Data flow and state management** ✅
79
- - Controlled mode updates
80
- - Uncontrolled mode state
81
- - Value prop changes
82
-
83
- 8. **Conditional rendering logic** ✅
84
- - Single vs range slider
85
- - Tooltip config application
86
- - Deprecated prop fallbacks
87
-
88
- 9. **Integration tests** ✅
89
- - All props combined
90
- - Range slider with all props
91
-
92
- ### Test Statistics:
93
- - **Total test cases**: 60+
94
- - **Test patterns used**:
95
- - `it.each()` for repetitive prop variations
96
- - Reusable helper functions (`renderSlider`, `getSlider`)
97
- - Grouped `describe()` blocks by functionality
98
- - Mock data in separate file for reusability
99
-
100
- ### Code Quality:
101
- - ✅ DRY principles (reusable helpers)
102
- - ✅ No component source code modifications
103
- - ✅ Uses @testing-library/react
104
- - ✅ No mocking of Cap UI components
105
- - ✅ Focuses on functional behavior
106
- - ✅ No styling/CSS class testing
107
-
108
- ## Next Steps:
109
- 1. **Access Google Sheets** to complete Phase 0 and Phase 1
110
- 2. **Run tests** to verify coverage percentage
111
- 3. **Add missing use case tests** if any gaps are identified from spreadsheet
112
- 4. **Verify 90%+ coverage** target is met
113
-
114
- ## Notes:
115
- - Tests are designed to be maintainable and follow existing codebase patterns
116
- - All deprecated props are tested for backward compatibility
117
- - Edge cases cover boundary conditions and null/undefined handling
118
- - Integration tests verify complex prop combinations work correctly