@cranberry-money/shared-utils 8.17.2 → 8.17.3
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/badge-status.d.ts +6 -2
- package/dist/badge-status.d.ts.map +1 -1
- package/dist/badge.d.ts +9 -1
- package/dist/badge.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/badge-status.d.ts
CHANGED
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
* This module provides pre-configured badge functions for common status types
|
|
5
5
|
* in the MyPortfolio platform. It builds on top of the core badge system.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
|
|
7
|
+
import type { BadgeStyle, TradeStatus, WithdrawalStatus, LiquidationStatus, TargetTradeStatus } from '@cranberry-money/shared-types';
|
|
8
|
+
interface StatusBadgeStyle extends BadgeStyle {
|
|
9
|
+
displayText: string;
|
|
10
|
+
}
|
|
11
|
+
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
9
12
|
/**
|
|
10
13
|
* Creates a badge for trade status
|
|
11
14
|
*
|
|
@@ -62,4 +65,5 @@ export declare function getLiquidationStatusBadge(status: LiquidationStatus, siz
|
|
|
62
65
|
* ```
|
|
63
66
|
*/
|
|
64
67
|
export declare function getTargetTradeStatusBadge(status: TargetTradeStatus, size?: BadgeSize): StatusBadgeStyle;
|
|
68
|
+
export {};
|
|
65
69
|
//# sourceMappingURL=badge-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge-status.d.ts","sourceRoot":"","sources":["../src/badge-status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"badge-status.d.ts","sourceRoot":"","sources":["../src/badge-status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAGvC,UAAU,gBAAiB,SAAQ,UAAU;IAC3C,WAAW,EAAE,MAAM,CAAC;CACrB;AAuDD,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAgFpC;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAUjG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAU3G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAU7G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAU7G"}
|
package/dist/badge.d.ts
CHANGED
|
@@ -8,7 +8,14 @@
|
|
|
8
8
|
* Note: The actual style classes are designed to work with Tailwind CSS
|
|
9
9
|
* and assume a specific color system is in place.
|
|
10
10
|
*/
|
|
11
|
-
import type {
|
|
11
|
+
import type { BadgeStyle } from '@cranberry-money/shared-types';
|
|
12
|
+
type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
13
|
+
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
14
|
+
interface BadgeConfig {
|
|
15
|
+
variant: BadgeVariant;
|
|
16
|
+
size?: BadgeSize;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
12
19
|
/**
|
|
13
20
|
* Creates a badge style configuration with appropriate CSS classes
|
|
14
21
|
*
|
|
@@ -38,4 +45,5 @@ export declare function createBadge({ variant, size, className }: BadgeConfig, v
|
|
|
38
45
|
*/
|
|
39
46
|
export declare const BADGE_VARIANTS: Record<BadgeVariant, string>;
|
|
40
47
|
export declare const BADGE_SIZES: Record<BadgeSize, string>;
|
|
48
|
+
export {};
|
|
41
49
|
//# sourceMappingURL=badge.d.ts.map
|
package/dist/badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAC/G,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpC,UAAU,WAAW;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+BD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CACzB,EAAE,OAAO,EAAE,IAAW,EAAE,SAAc,EAAE,EAAE,WAAW,EACrD,aAAa,GAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAA0B,EACpE,UAAU,GAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAuB,GAC1D,UAAU,CAQZ;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,8BAAyB,CAAC;AACrD,eAAO,MAAM,WAAW,2BAAsB,CAAC"}
|