@capillarytech/blaze-ui 4.2.0 → 4.3.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/dist/CapAskAira/index.js +111 -7
- package/dist/CapAskAira/index.js.map +1 -1
- package/dist/CapCollapsibleLeftNavigation/index.js +111 -7
- package/dist/CapCollapsibleLeftNavigation/index.js.map +1 -1
- package/dist/CapCollapsibleNavbar/index.js +111 -7
- package/dist/CapCollapsibleNavbar/index.js.map +1 -1
- package/dist/CapDivider/README.md +122 -0
- package/dist/CapDivider/index.d.ts +2 -17
- package/dist/CapDivider/index.d.ts.map +1 -1
- package/dist/CapDivider/index.js +521 -8
- package/dist/CapDivider/index.js.map +1 -1
- package/dist/CapDivider/tests/__snapshots__/index.test.tsx.snap +57 -7
- package/dist/CapDivider/types.d.ts +32 -0
- package/dist/CapDivider/types.d.ts.map +1 -0
- package/dist/CapDragReorder/index.js +111 -7
- package/dist/CapDragReorder/index.js.map +1 -1
- package/dist/CapEventCalendar/index.js +290 -8
- package/dist/CapEventCalendar/index.js.map +1 -1
- package/dist/CapIllustration/index.js +290 -8
- package/dist/CapIllustration/index.js.map +1 -1
- package/dist/CapMobileDateRangePicker/index.js +111 -7
- package/dist/CapMobileDateRangePicker/index.js.map +1 -1
- package/dist/CapNavigation/index.js +111 -7
- package/dist/CapNavigation/index.js.map +1 -1
- package/dist/CapNotificationDropdown/index.js +111 -7
- package/dist/CapNotificationDropdown/index.js.map +1 -1
- package/dist/CapSecondaryTopBar/index.js +111 -7
- package/dist/CapSecondaryTopBar/index.js.map +1 -1
- package/dist/CapStatisticCard/README.md +138 -0
- package/dist/CapStatisticCard/index.d.ts +6 -0
- package/dist/CapStatisticCard/index.d.ts.map +1 -0
- package/dist/CapStatisticCard/index.js +143 -259
- package/dist/CapStatisticCard/index.js.map +1 -1
- package/dist/CapStatisticCard/types.d.ts +12 -0
- package/dist/CapStatisticCard/types.d.ts.map +1 -0
- package/dist/CapTimeline/index.js +111 -7
- package/dist/CapTimeline/index.js.map +1 -1
- package/dist/CapTimelineNested/index.js +111 -7
- package/dist/CapTimelineNested/index.js.map +1 -1
- package/dist/CapTopBar/index.js +111 -7
- package/dist/CapTopBar/index.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +290 -8
- package/dist/index.js.map +1 -1
- package/package.json +19 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# CapDivider
|
|
2
|
+
|
|
3
|
+
A divider component for separating content sections.
|
|
4
|
+
|
|
5
|
+
## Migration from cap-ui-library
|
|
6
|
+
|
|
7
|
+
### Summary of Changes
|
|
8
|
+
|
|
9
|
+
CapDivider has been migrated from cap-ui-library to blaze-ui with minimal breaking changes. The component now uses Ant Design v6 APIs while maintaining backward compatibility with deprecated props.
|
|
10
|
+
|
|
11
|
+
### Prop Changes
|
|
12
|
+
|
|
13
|
+
#### Renamed Props
|
|
14
|
+
- None
|
|
15
|
+
|
|
16
|
+
#### Deprecated Props (Still Supported)
|
|
17
|
+
- `orientation="left"` → Maps to `orientation="start"` (deprecated, use `start` instead)
|
|
18
|
+
- `orientation="right"` → Maps to `orientation="end"` (deprecated, use `end` instead)
|
|
19
|
+
|
|
20
|
+
**Note:** Deprecated values (`left` and `right`) will show console warnings in development mode but continue to work for backward compatibility.
|
|
21
|
+
|
|
22
|
+
#### New Props
|
|
23
|
+
- `type` - Controls divider direction: `'horizontal' | 'vertical'` (maps to Ant Design's `orientation` prop)
|
|
24
|
+
- `orientation` - Controls text alignment: `'start' | 'center' | 'end'` (maps to Ant Design's `titlePlacement` prop)
|
|
25
|
+
|
|
26
|
+
### API Changes
|
|
27
|
+
|
|
28
|
+
#### Before (cap-ui-library)
|
|
29
|
+
```jsx
|
|
30
|
+
import CapDivider from '@capillarytech/cap-ui-library/components/CapDivider';
|
|
31
|
+
|
|
32
|
+
<CapDivider orientation="left">Text</CapDivider>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### After (blaze-ui)
|
|
36
|
+
```jsx
|
|
37
|
+
import { CapDivider } from '@capillarytech/blaze-ui';
|
|
38
|
+
|
|
39
|
+
// New API (recommended)
|
|
40
|
+
<CapDivider orientation="start">Text</CapDivider>
|
|
41
|
+
|
|
42
|
+
// Legacy API (still works, shows deprecation warning)
|
|
43
|
+
<CapDivider orientation="left">Text</CapDivider>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Behavioral Changes
|
|
47
|
+
|
|
48
|
+
- **No breaking changes** - All existing functionality is preserved
|
|
49
|
+
- Deprecated `orientation` values (`left`/`right`) are automatically mapped to their new equivalents (`start`/`end`)
|
|
50
|
+
- Console warnings are shown in development mode when deprecated props are used
|
|
51
|
+
|
|
52
|
+
### Migration Steps for Consumers
|
|
53
|
+
|
|
54
|
+
1. **Update imports:**
|
|
55
|
+
```jsx
|
|
56
|
+
// Old
|
|
57
|
+
import CapDivider from '@capillarytech/cap-ui-library/components/CapDivider';
|
|
58
|
+
|
|
59
|
+
// New
|
|
60
|
+
import { CapDivider } from '@capillarytech/blaze-ui';
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
2. **Update deprecated prop values (optional, but recommended):**
|
|
64
|
+
```jsx
|
|
65
|
+
// Old
|
|
66
|
+
<CapDivider orientation="left">Text</CapDivider>
|
|
67
|
+
<CapDivider orientation="right">Text</CapDivider>
|
|
68
|
+
|
|
69
|
+
// New
|
|
70
|
+
<CapDivider orientation="start">Text</CapDivider>
|
|
71
|
+
<CapDivider orientation="end">Text</CapDivider>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Note:** The old values still work, but you'll see deprecation warnings in development.
|
|
75
|
+
|
|
76
|
+
### Code Examples
|
|
77
|
+
|
|
78
|
+
#### Basic Usage
|
|
79
|
+
```jsx
|
|
80
|
+
import { CapDivider } from '@capillarytech/blaze-ui';
|
|
81
|
+
|
|
82
|
+
// Horizontal divider without text
|
|
83
|
+
<CapDivider />
|
|
84
|
+
|
|
85
|
+
// Horizontal divider with centered text
|
|
86
|
+
<CapDivider>Section Title</CapDivider>
|
|
87
|
+
|
|
88
|
+
// Horizontal divider with left-aligned text
|
|
89
|
+
<CapDivider orientation="start">Left Text</CapDivider>
|
|
90
|
+
|
|
91
|
+
// Horizontal divider with right-aligned text
|
|
92
|
+
<CapDivider orientation="end">Right Text</CapDivider>
|
|
93
|
+
|
|
94
|
+
// Vertical divider
|
|
95
|
+
<CapDivider type="vertical" />
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### With Custom Styling
|
|
99
|
+
```jsx
|
|
100
|
+
<CapDivider className="custom-divider" style={{ margin: '2rem 0' }}>
|
|
101
|
+
Custom Styled Divider
|
|
102
|
+
</CapDivider>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### With Ant Design Props
|
|
106
|
+
```jsx
|
|
107
|
+
<CapDivider dashed plain>
|
|
108
|
+
Dashed Plain Divider
|
|
109
|
+
</CapDivider>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Import Examples
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
// Default import
|
|
116
|
+
import { CapDivider } from '@capillarytech/blaze-ui';
|
|
117
|
+
|
|
118
|
+
// With type import
|
|
119
|
+
import { CapDivider } from '@capillarytech/blaze-ui';
|
|
120
|
+
import type { CapDividerProps } from '@capillarytech/blaze-ui';
|
|
121
|
+
```
|
|
122
|
+
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import type { DividerProps } from 'antd-v5';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface CapDividerProps extends Omit<DividerProps, 'titlePlacement' | 'orientation'> {
|
|
6
|
-
className?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Text alignment placement for the divider title.
|
|
9
|
-
* v6 API: 'start' | 'center' | 'end' (maps to titlePlacement prop)
|
|
10
|
-
* Legacy values 'left' and 'right' are automatically mapped to 'start' and 'end'
|
|
11
|
-
*/
|
|
12
|
-
orientation?: LegacyAlignment | TitlePlacement;
|
|
13
|
-
/**
|
|
14
|
-
* Direction of the divider.
|
|
15
|
-
* Maps to Ant Design's orientation prop: 'horizontal' | 'vertical'
|
|
16
|
-
*/
|
|
17
|
-
type?: 'horizontal' | 'vertical';
|
|
18
|
-
}
|
|
2
|
+
import { CapDividerProps } from './types';
|
|
3
|
+
import './styles.scss';
|
|
19
4
|
declare const CapDivider: React.FC<CapDividerProps>;
|
|
20
5
|
export default CapDivider;
|
|
21
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDivider/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDivider/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAmC,MAAM,SAAS,CAAC;AAC3E,OAAO,eAAe,CAAC;AAiCvB,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwDzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|