@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.
Files changed (46) hide show
  1. package/dist/CapAskAira/index.js +111 -7
  2. package/dist/CapAskAira/index.js.map +1 -1
  3. package/dist/CapCollapsibleLeftNavigation/index.js +111 -7
  4. package/dist/CapCollapsibleLeftNavigation/index.js.map +1 -1
  5. package/dist/CapCollapsibleNavbar/index.js +111 -7
  6. package/dist/CapCollapsibleNavbar/index.js.map +1 -1
  7. package/dist/CapDivider/README.md +122 -0
  8. package/dist/CapDivider/index.d.ts +2 -17
  9. package/dist/CapDivider/index.d.ts.map +1 -1
  10. package/dist/CapDivider/index.js +521 -8
  11. package/dist/CapDivider/index.js.map +1 -1
  12. package/dist/CapDivider/tests/__snapshots__/index.test.tsx.snap +57 -7
  13. package/dist/CapDivider/types.d.ts +32 -0
  14. package/dist/CapDivider/types.d.ts.map +1 -0
  15. package/dist/CapDragReorder/index.js +111 -7
  16. package/dist/CapDragReorder/index.js.map +1 -1
  17. package/dist/CapEventCalendar/index.js +290 -8
  18. package/dist/CapEventCalendar/index.js.map +1 -1
  19. package/dist/CapIllustration/index.js +290 -8
  20. package/dist/CapIllustration/index.js.map +1 -1
  21. package/dist/CapMobileDateRangePicker/index.js +111 -7
  22. package/dist/CapMobileDateRangePicker/index.js.map +1 -1
  23. package/dist/CapNavigation/index.js +111 -7
  24. package/dist/CapNavigation/index.js.map +1 -1
  25. package/dist/CapNotificationDropdown/index.js +111 -7
  26. package/dist/CapNotificationDropdown/index.js.map +1 -1
  27. package/dist/CapSecondaryTopBar/index.js +111 -7
  28. package/dist/CapSecondaryTopBar/index.js.map +1 -1
  29. package/dist/CapStatisticCard/README.md +138 -0
  30. package/dist/CapStatisticCard/index.d.ts +6 -0
  31. package/dist/CapStatisticCard/index.d.ts.map +1 -0
  32. package/dist/CapStatisticCard/index.js +143 -259
  33. package/dist/CapStatisticCard/index.js.map +1 -1
  34. package/dist/CapStatisticCard/types.d.ts +12 -0
  35. package/dist/CapStatisticCard/types.d.ts.map +1 -0
  36. package/dist/CapTimeline/index.js +111 -7
  37. package/dist/CapTimeline/index.js.map +1 -1
  38. package/dist/CapTimelineNested/index.js +111 -7
  39. package/dist/CapTimelineNested/index.js.map +1 -1
  40. package/dist/CapTopBar/index.js +111 -7
  41. package/dist/CapTopBar/index.js.map +1 -1
  42. package/dist/index.d.ts +3 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +290 -8
  45. package/dist/index.js.map +1 -1
  46. 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
- type LegacyAlignment = 'left' | 'right';
4
- type TitlePlacement = 'start' | 'center' | 'end';
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":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAExC,KAAK,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAcjD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,aAAa,CAAC;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;IAC/C;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CAClC;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAYzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
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"}