@cranberry-money/shared-constants 4.9.2 → 4.11.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/business/status/cash-accounts.d.ts.map +1 -1
- package/dist/business/status/cash-accounts.js +4 -3
- package/dist/business/status/trades.d.ts +6 -6
- package/dist/business/status/trades.d.ts.map +1 -1
- package/dist/business/status/trades.js +8 -7
- package/dist/business/status/withdrawals.d.ts +8 -8
- package/dist/business/status/withdrawals.d.ts.map +1 -1
- package/dist/business/status/withdrawals.js +9 -8
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/statuses.d.ts +18 -0
- package/dist/common/statuses.d.ts.map +1 -0
- package/dist/common/statuses.js +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/ui/colors.d.ts +10 -10
- package/dist/ui/colors.d.ts.map +1 -1
- package/dist/ui/colors.js +28 -25
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/status-colors-unified.d.ts +91 -0
- package/dist/ui/status-colors-unified.d.ts.map +1 -0
- package/dist/ui/status-colors-unified.js +106 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cash-accounts.d.ts","sourceRoot":"","sources":["../../../src/business/status/cash-accounts.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"cash-accounts.d.ts","sourceRoot":"","sources":["../../../src/business/status/cash-accounts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,eAAO,MAAM,6BAA6B;;;;;;;;CAQhC,CAAC;AAEX,MAAM,MAAM,0BAA0B,GACpC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,OAAO,6BAA6B,CAAC,CAAC;AAGrF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAQlF,CAAC;AAGX,eAAO,MAAM,+BAA+B;;;;;;;;CAQlC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,OAAO,+BAA+B,CAAC,CAAC;AAGzF,eAAO,MAAM,sCAAsC,EAAE,MAAM,CAAC,4BAA4B,EAAE,MAAM,CAQtF,CAAC;AAGX,eAAO,MAAM,8BAA8B,QACkC,CAAC;AAC9E,eAAO,MAAM,iCAAiC,QACkC,CAAC;AACjF,eAAO,MAAM,uCAAuC,QACkC,CAAC;AACvF,eAAO,MAAM,mCAAmC,QACkC,CAAC;AACnF,eAAO,MAAM,0BAA0B,QAA0E,CAAC;AAClH,eAAO,MAAM,+BAA+B,QACkC,CAAC;AAC/E,eAAO,MAAM,4BAA4B,QAA4E,CAAC;AAGtH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAQ3B,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Cash account transaction status constants
|
|
3
3
|
* These constants should match the backend constants in bilberry/cash_accounts/constants.py
|
|
4
4
|
*/
|
|
5
|
+
import { COMMON_STATUS } from '../../common/statuses';
|
|
5
6
|
export const CASH_ACCOUNT_TRANSACTION_TYPE = {
|
|
6
7
|
DEPOSIT: 'DEPOSIT',
|
|
7
8
|
WITHDRAWAL: 'WITHDRAWAL',
|
|
@@ -23,10 +24,10 @@ export const CASH_ACCOUNT_TRANSACTION_TYPE_LABELS = {
|
|
|
23
24
|
};
|
|
24
25
|
// Cash account transaction status constants
|
|
25
26
|
export const CASH_ACCOUNT_TRANSACTION_STATUS = {
|
|
26
|
-
PENDING:
|
|
27
|
+
PENDING: COMMON_STATUS.PENDING, // Using common status
|
|
27
28
|
PROCESSED: 'PROCESSED',
|
|
28
|
-
FAILED:
|
|
29
|
-
CANCELLED:
|
|
29
|
+
FAILED: COMMON_STATUS.FAILED, // Using common status
|
|
30
|
+
CANCELLED: COMMON_STATUS.CANCELLED, // Using common status
|
|
30
31
|
REVERSED: 'REVERSED',
|
|
31
32
|
ON_HOLD: 'ON_HOLD',
|
|
32
33
|
REFUNDED: 'REFUNDED',
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Trade status constants
|
|
3
3
|
* These constants should match the backend constants in bilberry/trades/constants.py
|
|
4
4
|
*/
|
|
5
|
-
export declare const TARGET_TRADE_STATUS_PENDING
|
|
6
|
-
export declare const TARGET_TRADE_STATUS_APPROVED
|
|
5
|
+
export declare const TARGET_TRADE_STATUS_PENDING: "PENDING";
|
|
6
|
+
export declare const TARGET_TRADE_STATUS_APPROVED: "APPROVED";
|
|
7
7
|
export declare const TARGET_TRADE_STATUS_SUBMITTED = "SUBMITTED";
|
|
8
|
-
export declare const TARGET_TRADE_STATUS_CANCELLED
|
|
8
|
+
export declare const TARGET_TRADE_STATUS_CANCELLED: "CANCELLED";
|
|
9
9
|
export declare const TARGET_TRADE_STATUS_EXPIRED = "EXPIRED";
|
|
10
10
|
export declare const TARGET_TRADE_STATUS: {
|
|
11
11
|
readonly PENDING: "PENDING";
|
|
@@ -25,10 +25,10 @@ export declare const TARGET_TRADE_STATUS_OPTIONS: {
|
|
|
25
25
|
value: string;
|
|
26
26
|
label: string;
|
|
27
27
|
}[];
|
|
28
|
-
export declare const TRADE_STATUS_EXECUTED
|
|
28
|
+
export declare const TRADE_STATUS_EXECUTED: "EXECUTED";
|
|
29
29
|
export declare const TRADE_STATUS_SETTLED = "SETTLED";
|
|
30
|
-
export declare const TRADE_STATUS_CANCELLED
|
|
31
|
-
export declare const TRADE_STATUS_FAILED
|
|
30
|
+
export declare const TRADE_STATUS_CANCELLED: "CANCELLED";
|
|
31
|
+
export declare const TRADE_STATUS_FAILED: "FAILED";
|
|
32
32
|
export declare const TRADE_STATUS: {
|
|
33
33
|
readonly PENDING: "PENDING";
|
|
34
34
|
readonly EXECUTED: "EXECUTED";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trades.d.ts","sourceRoot":"","sources":["../../../src/business/status/trades.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"trades.d.ts","sourceRoot":"","sources":["../../../src/business/status/trades.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,2BAA2B,WAAwB,CAAC;AACjE,eAAO,MAAM,4BAA4B,YAAyB,CAAC;AACnE,eAAO,MAAM,6BAA6B,cAAc,CAAC;AACzD,eAAO,MAAM,6BAA6B,aAA0B,CAAC;AACrE,eAAO,MAAM,2BAA2B,YAAY,CAAC;AAErD,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAG/F,eAAO,MAAM,iCAAiC,uBAAuB,CAAC;AACtE,eAAO,MAAM,kCAAkC,aAAa,CAAC;AAC7D,eAAO,MAAM,mCAAmC,wBAAwB,CAAC;AACzE,eAAO,MAAM,mCAAmC,cAAc,CAAC;AAC/D,eAAO,MAAM,iCAAiC,YAAY,CAAC;AAE3D,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAM/D,CAAC;AAGX,eAAO,MAAM,2BAA2B;;;GAMvC,CAAC;AAGF,eAAO,MAAM,qBAAqB,YAAyB,CAAC;AAC5D,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,mBAAmB,UAAuB,CAAC;AAExD,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAG3E,eAAO,MAAM,2BAA2B,aAAa,CAAC;AACtD,eAAO,MAAM,0BAA0B,YAAY,CAAC;AACpD,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAGlD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAUlD,CAAC;AAGX,eAAO,MAAM,oBAAoB;;;GAKhC,CAAC;AAGF,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,iBAAiB,SAAS,CAAC;AAGxC,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAC5C,eAAO,MAAM,uBAAuB,SAAS,CAAC;AAG9C,eAAO,MAAM,oBAAoB;;;GAGhC,CAAC;AAGF,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAErE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAG9C,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAErE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAK9C,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAKnD,CAAC"}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* Trade status constants
|
|
3
3
|
* These constants should match the backend constants in bilberry/trades/constants.py
|
|
4
4
|
*/
|
|
5
|
+
import { COMMON_STATUS } from '../../common/statuses';
|
|
5
6
|
// Target Trade Status constants - matching backend constants
|
|
6
|
-
export const TARGET_TRADE_STATUS_PENDING =
|
|
7
|
-
export const TARGET_TRADE_STATUS_APPROVED =
|
|
7
|
+
export const TARGET_TRADE_STATUS_PENDING = COMMON_STATUS.PENDING; // Using common status
|
|
8
|
+
export const TARGET_TRADE_STATUS_APPROVED = COMMON_STATUS.APPROVED; // Using common status
|
|
8
9
|
export const TARGET_TRADE_STATUS_SUBMITTED = 'SUBMITTED';
|
|
9
|
-
export const TARGET_TRADE_STATUS_CANCELLED =
|
|
10
|
+
export const TARGET_TRADE_STATUS_CANCELLED = COMMON_STATUS.CANCELLED; // Using common status
|
|
10
11
|
export const TARGET_TRADE_STATUS_EXPIRED = 'EXPIRED';
|
|
11
12
|
export const TARGET_TRADE_STATUS = {
|
|
12
13
|
PENDING: TARGET_TRADE_STATUS_PENDING,
|
|
@@ -37,12 +38,12 @@ export const TARGET_TRADE_STATUS_OPTIONS = [
|
|
|
37
38
|
{ value: TARGET_TRADE_STATUS_EXPIRED, label: TARGET_TRADE_STATUS_LABEL_EXPIRED },
|
|
38
39
|
];
|
|
39
40
|
// Trade Status constants (for executed trades)
|
|
40
|
-
export const TRADE_STATUS_EXECUTED =
|
|
41
|
+
export const TRADE_STATUS_EXECUTED = COMMON_STATUS.EXECUTED; // Using common status
|
|
41
42
|
export const TRADE_STATUS_SETTLED = 'SETTLED';
|
|
42
|
-
export const TRADE_STATUS_CANCELLED =
|
|
43
|
-
export const TRADE_STATUS_FAILED =
|
|
43
|
+
export const TRADE_STATUS_CANCELLED = COMMON_STATUS.CANCELLED; // Using common status
|
|
44
|
+
export const TRADE_STATUS_FAILED = COMMON_STATUS.FAILED; // Using common status
|
|
44
45
|
export const TRADE_STATUS = {
|
|
45
|
-
PENDING:
|
|
46
|
+
PENDING: COMMON_STATUS.PENDING, // Using common status
|
|
46
47
|
EXECUTED: TRADE_STATUS_EXECUTED,
|
|
47
48
|
SETTLED: TRADE_STATUS_SETTLED,
|
|
48
49
|
CANCELLED: TRADE_STATUS_CANCELLED,
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* These constants should match the backend constants in bilberry/withdrawals/constants.py
|
|
4
4
|
*/
|
|
5
5
|
export declare const WITHDRAWAL_STATUS_PENDING_REVIEW = "PENDING_REVIEW";
|
|
6
|
-
export declare const WITHDRAWAL_STATUS_APPROVED
|
|
6
|
+
export declare const WITHDRAWAL_STATUS_APPROVED: "APPROVED";
|
|
7
7
|
export declare const WITHDRAWAL_STATUS_REJECTED = "REJECTED";
|
|
8
|
-
export declare const WITHDRAWAL_STATUS_PROCESSING
|
|
8
|
+
export declare const WITHDRAWAL_STATUS_PROCESSING: "PROCESSING";
|
|
9
9
|
export declare const WITHDRAWAL_STATUS_AWAITING_LIQUIDATION = "AWAITING_LIQUIDATION";
|
|
10
10
|
export declare const WITHDRAWAL_STATUS_LIQUIDATION_IN_PROGRESS = "LIQUIDATION_IN_PROGRESS";
|
|
11
|
-
export declare const WITHDRAWAL_STATUS_COMPLETED
|
|
12
|
-
export declare const WITHDRAWAL_STATUS_CANCELLED
|
|
13
|
-
export declare const WITHDRAWAL_STATUS_FAILED
|
|
11
|
+
export declare const WITHDRAWAL_STATUS_COMPLETED: "COMPLETED";
|
|
12
|
+
export declare const WITHDRAWAL_STATUS_CANCELLED: "CANCELLED";
|
|
13
|
+
export declare const WITHDRAWAL_STATUS_FAILED: "FAILED";
|
|
14
14
|
export declare const WITHDRAWAL_STATUS: {
|
|
15
15
|
readonly PENDING_REVIEW: "PENDING_REVIEW";
|
|
16
16
|
readonly APPROVED: "APPROVED";
|
|
@@ -37,11 +37,11 @@ export declare const WITHDRAWAL_STATUS_OPTIONS: {
|
|
|
37
37
|
value: string;
|
|
38
38
|
label: string;
|
|
39
39
|
}[];
|
|
40
|
-
export declare const LIQUIDATION_STATUS_PENDING
|
|
40
|
+
export declare const LIQUIDATION_STATUS_PENDING: "PENDING";
|
|
41
41
|
export declare const LIQUIDATION_STATUS_TRADES_CREATED = "TRADES_CREATED";
|
|
42
|
-
export declare const LIQUIDATION_STATUS_EXECUTED
|
|
42
|
+
export declare const LIQUIDATION_STATUS_EXECUTED: "EXECUTED";
|
|
43
43
|
export declare const LIQUIDATION_STATUS_SETTLED = "SETTLED";
|
|
44
|
-
export declare const LIQUIDATION_STATUS_FAILED
|
|
44
|
+
export declare const LIQUIDATION_STATUS_FAILED: "FAILED";
|
|
45
45
|
export declare const LIQUIDATION_STATUS: {
|
|
46
46
|
readonly PENDING: "PENDING";
|
|
47
47
|
readonly TRADES_CREATED: "TRADES_CREATED";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../../../src/business/status/withdrawals.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../../../src/business/status/withdrawals.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
* Withdrawal status constants
|
|
3
3
|
* These constants should match the backend constants in bilberry/withdrawals/constants.py
|
|
4
4
|
*/
|
|
5
|
+
import { COMMON_STATUS } from '../../common/statuses';
|
|
5
6
|
// Withdrawal status constants
|
|
6
7
|
export const WITHDRAWAL_STATUS_PENDING_REVIEW = 'PENDING_REVIEW';
|
|
7
|
-
export const WITHDRAWAL_STATUS_APPROVED =
|
|
8
|
+
export const WITHDRAWAL_STATUS_APPROVED = COMMON_STATUS.APPROVED; // Using common status
|
|
8
9
|
export const WITHDRAWAL_STATUS_REJECTED = 'REJECTED';
|
|
9
|
-
export const WITHDRAWAL_STATUS_PROCESSING =
|
|
10
|
+
export const WITHDRAWAL_STATUS_PROCESSING = COMMON_STATUS.PROCESSING; // Using common status
|
|
10
11
|
export const WITHDRAWAL_STATUS_AWAITING_LIQUIDATION = 'AWAITING_LIQUIDATION';
|
|
11
12
|
export const WITHDRAWAL_STATUS_LIQUIDATION_IN_PROGRESS = 'LIQUIDATION_IN_PROGRESS';
|
|
12
|
-
export const WITHDRAWAL_STATUS_COMPLETED =
|
|
13
|
-
export const WITHDRAWAL_STATUS_CANCELLED =
|
|
14
|
-
export const WITHDRAWAL_STATUS_FAILED =
|
|
13
|
+
export const WITHDRAWAL_STATUS_COMPLETED = COMMON_STATUS.COMPLETED; // Using common status
|
|
14
|
+
export const WITHDRAWAL_STATUS_CANCELLED = COMMON_STATUS.CANCELLED; // Using common status
|
|
15
|
+
export const WITHDRAWAL_STATUS_FAILED = COMMON_STATUS.FAILED; // Using common status
|
|
15
16
|
export const WITHDRAWAL_STATUS = {
|
|
16
17
|
PENDING_REVIEW: WITHDRAWAL_STATUS_PENDING_REVIEW,
|
|
17
18
|
APPROVED: WITHDRAWAL_STATUS_APPROVED,
|
|
@@ -58,11 +59,11 @@ export const WITHDRAWAL_STATUS_OPTIONS = [
|
|
|
58
59
|
{ value: WITHDRAWAL_STATUS_FAILED, label: WITHDRAWAL_STATUS_LABEL_FAILED },
|
|
59
60
|
];
|
|
60
61
|
// Liquidation status constants
|
|
61
|
-
export const LIQUIDATION_STATUS_PENDING =
|
|
62
|
+
export const LIQUIDATION_STATUS_PENDING = COMMON_STATUS.PENDING; // Using common status
|
|
62
63
|
export const LIQUIDATION_STATUS_TRADES_CREATED = 'TRADES_CREATED';
|
|
63
|
-
export const LIQUIDATION_STATUS_EXECUTED =
|
|
64
|
+
export const LIQUIDATION_STATUS_EXECUTED = COMMON_STATUS.EXECUTED; // Using common status
|
|
64
65
|
export const LIQUIDATION_STATUS_SETTLED = 'SETTLED';
|
|
65
|
-
export const LIQUIDATION_STATUS_FAILED =
|
|
66
|
+
export const LIQUIDATION_STATUS_FAILED = COMMON_STATUS.FAILED; // Using common status
|
|
66
67
|
export const LIQUIDATION_STATUS = {
|
|
67
68
|
PENDING: LIQUIDATION_STATUS_PENDING,
|
|
68
69
|
TRADES_CREATED: LIQUIDATION_STATUS_TRADES_CREATED,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './statuses';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common status constants shared across multiple domains
|
|
3
|
+
* These values appear frequently across withdrawals, trades, cash accounts, etc.
|
|
4
|
+
*/
|
|
5
|
+
export declare const COMMON_STATUS: {
|
|
6
|
+
readonly PENDING: "PENDING";
|
|
7
|
+
readonly APPROVED: "APPROVED";
|
|
8
|
+
readonly CANCELLED: "CANCELLED";
|
|
9
|
+
readonly FAILED: "FAILED";
|
|
10
|
+
readonly COMPLETED: "COMPLETED";
|
|
11
|
+
readonly PROCESSING: "PROCESSING";
|
|
12
|
+
readonly ACTIVE: "ACTIVE";
|
|
13
|
+
readonly INACTIVE: "INACTIVE";
|
|
14
|
+
readonly EXECUTED: "EXECUTED";
|
|
15
|
+
};
|
|
16
|
+
export type CommonStatusValues = (typeof COMMON_STATUS)[keyof typeof COMMON_STATUS];
|
|
17
|
+
export declare const PENDING: "PENDING", APPROVED: "APPROVED", CANCELLED: "CANCELLED", FAILED: "FAILED", COMPLETED: "COMPLETED", PROCESSING: "PROCESSING", ACTIVE: "ACTIVE", INACTIVE: "INACTIVE", EXECUTED: "EXECUTED";
|
|
18
|
+
//# sourceMappingURL=statuses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statuses.d.ts","sourceRoot":"","sources":["../../src/common/statuses.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;CAUhB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAGpF,eAAO,MAAQ,OAAO,aAAE,QAAQ,cAAE,SAAS,eAAE,MAAM,YAAE,SAAS,eAAE,UAAU,gBAAE,MAAM,YAAE,QAAQ,cAAE,QAAQ,YACvF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common status constants shared across multiple domains
|
|
3
|
+
* These values appear frequently across withdrawals, trades, cash accounts, etc.
|
|
4
|
+
*/
|
|
5
|
+
export const COMMON_STATUS = {
|
|
6
|
+
PENDING: 'PENDING',
|
|
7
|
+
APPROVED: 'APPROVED',
|
|
8
|
+
CANCELLED: 'CANCELLED',
|
|
9
|
+
FAILED: 'FAILED',
|
|
10
|
+
COMPLETED: 'COMPLETED',
|
|
11
|
+
PROCESSING: 'PROCESSING',
|
|
12
|
+
ACTIVE: 'ACTIVE',
|
|
13
|
+
INACTIVE: 'INACTIVE',
|
|
14
|
+
EXECUTED: 'EXECUTED',
|
|
15
|
+
};
|
|
16
|
+
// Re-export individual values for convenience
|
|
17
|
+
export const { PENDING, APPROVED, CANCELLED, FAILED, COMPLETED, PROCESSING, ACTIVE, INACTIVE, EXECUTED } = COMMON_STATUS;
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,OAAO,CAAC;AAGtB,cAAc,YAAY,CAAC;AAG3B,cAAc,aAAa,CAAC;AAG5B,cAAc,MAAM,CAAC;AAGrB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,OAAO,CAAC;AAGtB,cAAc,YAAY,CAAC;AAG3B,cAAc,aAAa,CAAC;AAG5B,cAAc,MAAM,CAAC;AAGrB,cAAc,aAAa,CAAC;AAG5B,cAAc,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/ui/colors.d.ts
CHANGED
|
@@ -10,16 +10,16 @@ export declare const STATUS_COLORS: {
|
|
|
10
10
|
readonly NEUTRAL: "text-gray-600";
|
|
11
11
|
};
|
|
12
12
|
export type StatusColor = (typeof STATUS_COLORS)[keyof typeof STATUS_COLORS];
|
|
13
|
-
export declare const STATUS_COLOR_PENDING
|
|
14
|
-
export declare const STATUS_COLOR_AWAITING
|
|
15
|
-
export declare const STATUS_COLOR_PROCESSING
|
|
16
|
-
export declare const STATUS_COLOR_IN_PROGRESS
|
|
17
|
-
export declare const STATUS_COLOR_APPROVED
|
|
18
|
-
export declare const STATUS_COLOR_COMPLETED
|
|
19
|
-
export declare const STATUS_COLOR_REJECTED
|
|
20
|
-
export declare const STATUS_COLOR_FAILED
|
|
21
|
-
export declare const STATUS_COLOR_CANCELLED
|
|
22
|
-
export declare const STATUS_COLOR_DEFAULT
|
|
13
|
+
export declare const STATUS_COLOR_PENDING: "text-warning-600";
|
|
14
|
+
export declare const STATUS_COLOR_AWAITING: "text-warning-600";
|
|
15
|
+
export declare const STATUS_COLOR_PROCESSING: "text-primary-600";
|
|
16
|
+
export declare const STATUS_COLOR_IN_PROGRESS: "text-primary-600";
|
|
17
|
+
export declare const STATUS_COLOR_APPROVED: "text-success-600";
|
|
18
|
+
export declare const STATUS_COLOR_COMPLETED: "text-success-700";
|
|
19
|
+
export declare const STATUS_COLOR_REJECTED: "text-error-600";
|
|
20
|
+
export declare const STATUS_COLOR_FAILED: "text-error-700";
|
|
21
|
+
export declare const STATUS_COLOR_CANCELLED: "text-content-subtle";
|
|
22
|
+
export declare const STATUS_COLOR_DEFAULT: "text-content-subtle";
|
|
23
23
|
export declare const STATUS_BG_COLORS: {
|
|
24
24
|
readonly SUCCESS: "bg-green-50";
|
|
25
25
|
readonly WARNING: "bg-amber-50";
|
package/dist/ui/colors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/ui/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/ui/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,YAAY,yHAWf,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAI7E,eAAO,MAAM,oBAAoB,oBAAgC,CAAC;AAClE,eAAO,MAAM,qBAAqB,oBAAiC,CAAC;AACpE,eAAO,MAAM,uBAAuB,oBAAmC,CAAC;AACxE,eAAO,MAAM,wBAAwB,oBAAoC,CAAC;AAC1E,eAAO,MAAM,qBAAqB,oBAAiC,CAAC;AACpE,eAAO,MAAM,sBAAsB,oBAAkC,CAAC;AACtE,eAAO,MAAM,qBAAqB,kBAAiC,CAAC;AACpE,eAAO,MAAM,mBAAmB,kBAA+B,CAAC;AAChE,eAAO,MAAM,sBAAsB,uBAAkC,CAAC;AACtE,eAAO,MAAM,oBAAoB,uBAAgC,CAAC;AAGlE,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAGX,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAGX,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAIX,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqB/C,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAE7C,CAAC"}
|
package/dist/ui/colors.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UI color constants
|
|
3
3
|
*/
|
|
4
|
+
import { UNIFIED_STATUS_COLORS } from './status-colors-unified';
|
|
4
5
|
// Chart color palette (10 colors for data visualization) - Blueberry compatible
|
|
5
6
|
export const CHART_COLORS = [
|
|
6
7
|
'#3B82F6', // Blue - primary data color
|
|
@@ -23,16 +24,17 @@ export const STATUS_COLORS = {
|
|
|
23
24
|
NEUTRAL: 'text-gray-600',
|
|
24
25
|
};
|
|
25
26
|
// Individual status color constants for Blueberry compatibility
|
|
26
|
-
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
27
|
+
// Now referencing unified color mappings
|
|
28
|
+
export const STATUS_COLOR_PENDING = UNIFIED_STATUS_COLORS.pending;
|
|
29
|
+
export const STATUS_COLOR_AWAITING = UNIFIED_STATUS_COLORS.awaiting;
|
|
30
|
+
export const STATUS_COLOR_PROCESSING = UNIFIED_STATUS_COLORS.processing;
|
|
31
|
+
export const STATUS_COLOR_IN_PROGRESS = UNIFIED_STATUS_COLORS.in_progress;
|
|
32
|
+
export const STATUS_COLOR_APPROVED = UNIFIED_STATUS_COLORS.approved;
|
|
33
|
+
export const STATUS_COLOR_COMPLETED = UNIFIED_STATUS_COLORS.completed;
|
|
34
|
+
export const STATUS_COLOR_REJECTED = UNIFIED_STATUS_COLORS.rejected;
|
|
35
|
+
export const STATUS_COLOR_FAILED = UNIFIED_STATUS_COLORS.failed;
|
|
36
|
+
export const STATUS_COLOR_CANCELLED = UNIFIED_STATUS_COLORS.cancelled;
|
|
37
|
+
export const STATUS_COLOR_DEFAULT = UNIFIED_STATUS_COLORS.default;
|
|
36
38
|
// Background status colors
|
|
37
39
|
export const STATUS_BG_COLORS = {
|
|
38
40
|
SUCCESS: 'bg-green-50',
|
|
@@ -63,25 +65,26 @@ export const PERFORMANCE_COLORS = {
|
|
|
63
65
|
UNCHANGED: SEMANTIC_COLORS.NEUTRAL,
|
|
64
66
|
};
|
|
65
67
|
// Trading status colors
|
|
68
|
+
// @deprecated Use getStatusColor() from status-colors-unified instead
|
|
66
69
|
export const TRADING_STATUS_COLORS = {
|
|
67
70
|
// Trade statuses
|
|
68
|
-
PENDING:
|
|
69
|
-
EXECUTED:
|
|
70
|
-
SETTLED:
|
|
71
|
-
CANCELLED:
|
|
72
|
-
FAILED:
|
|
73
|
-
EXPIRED:
|
|
74
|
-
REJECTED:
|
|
71
|
+
PENDING: UNIFIED_STATUS_COLORS.pending,
|
|
72
|
+
EXECUTED: UNIFIED_STATUS_COLORS.executed,
|
|
73
|
+
SETTLED: UNIFIED_STATUS_COLORS.settled,
|
|
74
|
+
CANCELLED: UNIFIED_STATUS_COLORS.cancelled,
|
|
75
|
+
FAILED: UNIFIED_STATUS_COLORS.failed,
|
|
76
|
+
EXPIRED: UNIFIED_STATUS_COLORS.expired,
|
|
77
|
+
REJECTED: UNIFIED_STATUS_COLORS.rejected,
|
|
75
78
|
// Withdrawal statuses
|
|
76
|
-
PENDING_REVIEW:
|
|
77
|
-
APPROVED:
|
|
78
|
-
COMPLETED:
|
|
79
|
-
PROCESSING:
|
|
80
|
-
ON_HOLD:
|
|
79
|
+
PENDING_REVIEW: UNIFIED_STATUS_COLORS.pending_review,
|
|
80
|
+
APPROVED: UNIFIED_STATUS_COLORS.approved,
|
|
81
|
+
COMPLETED: UNIFIED_STATUS_COLORS.completed,
|
|
82
|
+
PROCESSING: UNIFIED_STATUS_COLORS.processing,
|
|
83
|
+
ON_HOLD: UNIFIED_STATUS_COLORS.on_hold,
|
|
81
84
|
// Portfolio statuses
|
|
82
|
-
ACTIVE:
|
|
83
|
-
INACTIVE:
|
|
84
|
-
CLOSED:
|
|
85
|
+
ACTIVE: UNIFIED_STATUS_COLORS.active,
|
|
86
|
+
INACTIVE: UNIFIED_STATUS_COLORS.inactive,
|
|
87
|
+
CLOSED: UNIFIED_STATUS_COLORS.closed,
|
|
85
88
|
};
|
|
86
89
|
/**
|
|
87
90
|
* Get chart color by index (cycles through palette)
|
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC"}
|
package/dist/ui/index.js
CHANGED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified status color mappings
|
|
3
|
+
* Consolidates duplicate color assignments for consistent UI styling
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Unified mapping of status states to Tailwind CSS color classes
|
|
7
|
+
* Groups similar states that should have the same visual treatment
|
|
8
|
+
*/
|
|
9
|
+
export declare const UNIFIED_STATUS_COLORS: {
|
|
10
|
+
readonly pending: "text-warning-600";
|
|
11
|
+
readonly awaiting: "text-warning-600";
|
|
12
|
+
readonly pending_review: "text-warning-600";
|
|
13
|
+
readonly on_hold: "text-warning-600";
|
|
14
|
+
readonly processing: "text-primary-600";
|
|
15
|
+
readonly in_progress: "text-primary-600";
|
|
16
|
+
readonly active: "text-primary-600";
|
|
17
|
+
readonly completed: "text-success-700";
|
|
18
|
+
readonly approved: "text-success-600";
|
|
19
|
+
readonly executed: "text-success-600";
|
|
20
|
+
readonly settled: "text-success-600";
|
|
21
|
+
readonly success: "text-success-600";
|
|
22
|
+
readonly failed: "text-error-700";
|
|
23
|
+
readonly rejected: "text-error-600";
|
|
24
|
+
readonly error: "text-error-600";
|
|
25
|
+
readonly cancelled: "text-content-subtle";
|
|
26
|
+
readonly expired: "text-content-subtle";
|
|
27
|
+
readonly inactive: "text-content-subtle";
|
|
28
|
+
readonly closed: "text-content-subtle";
|
|
29
|
+
readonly default: "text-content-subtle";
|
|
30
|
+
};
|
|
31
|
+
export type StatusColorKey = keyof typeof UNIFIED_STATUS_COLORS;
|
|
32
|
+
export type StatusColorValue = (typeof UNIFIED_STATUS_COLORS)[StatusColorKey];
|
|
33
|
+
/**
|
|
34
|
+
* Get color class for a status
|
|
35
|
+
* @param status - The status key (lowercase)
|
|
36
|
+
* @returns The Tailwind CSS color class
|
|
37
|
+
*/
|
|
38
|
+
export declare const getStatusColor: (status: string) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Background color variants for status states
|
|
41
|
+
* Uses lighter shades for backgrounds
|
|
42
|
+
*/
|
|
43
|
+
export declare const UNIFIED_STATUS_BG_COLORS: {
|
|
44
|
+
readonly pending: "bg-warning-50";
|
|
45
|
+
readonly awaiting: "bg-warning-50";
|
|
46
|
+
readonly pending_review: "bg-warning-50";
|
|
47
|
+
readonly on_hold: "bg-warning-50";
|
|
48
|
+
readonly processing: "bg-primary-50";
|
|
49
|
+
readonly in_progress: "bg-primary-50";
|
|
50
|
+
readonly active: "bg-primary-50";
|
|
51
|
+
readonly completed: "bg-success-50";
|
|
52
|
+
readonly approved: "bg-success-50";
|
|
53
|
+
readonly executed: "bg-success-50";
|
|
54
|
+
readonly settled: "bg-success-50";
|
|
55
|
+
readonly success: "bg-success-50";
|
|
56
|
+
readonly failed: "bg-error-50";
|
|
57
|
+
readonly rejected: "bg-error-50";
|
|
58
|
+
readonly error: "bg-error-50";
|
|
59
|
+
readonly cancelled: "bg-gray-50";
|
|
60
|
+
readonly expired: "bg-gray-50";
|
|
61
|
+
readonly inactive: "bg-gray-50";
|
|
62
|
+
readonly closed: "bg-gray-50";
|
|
63
|
+
readonly default: "bg-gray-50";
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Badge color combinations (background + text)
|
|
67
|
+
* For use in status badges and pills
|
|
68
|
+
*/
|
|
69
|
+
export declare const UNIFIED_STATUS_BADGE_COLORS: {
|
|
70
|
+
readonly pending: "bg-warning-100 text-warning-700";
|
|
71
|
+
readonly awaiting: "bg-warning-100 text-warning-700";
|
|
72
|
+
readonly pending_review: "bg-warning-100 text-warning-700";
|
|
73
|
+
readonly on_hold: "bg-warning-100 text-warning-700";
|
|
74
|
+
readonly processing: "bg-primary-100 text-primary-700";
|
|
75
|
+
readonly in_progress: "bg-primary-100 text-primary-700";
|
|
76
|
+
readonly active: "bg-primary-100 text-primary-700";
|
|
77
|
+
readonly completed: "bg-success-100 text-success-700";
|
|
78
|
+
readonly approved: "bg-success-100 text-success-700";
|
|
79
|
+
readonly executed: "bg-success-100 text-success-700";
|
|
80
|
+
readonly settled: "bg-success-100 text-success-700";
|
|
81
|
+
readonly success: "bg-success-100 text-success-700";
|
|
82
|
+
readonly failed: "bg-error-100 text-error-700";
|
|
83
|
+
readonly rejected: "bg-error-100 text-error-700";
|
|
84
|
+
readonly error: "bg-error-100 text-error-700";
|
|
85
|
+
readonly cancelled: "bg-gray-100 text-gray-700";
|
|
86
|
+
readonly expired: "bg-gray-100 text-gray-700";
|
|
87
|
+
readonly inactive: "bg-gray-100 text-gray-700";
|
|
88
|
+
readonly closed: "bg-gray-100 text-gray-700";
|
|
89
|
+
readonly default: "bg-gray-100 text-gray-700";
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=status-colors-unified.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-colors-unified.d.ts","sourceRoot":"","sources":["../../src/ui/status-colors-unified.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;CA8BxB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,cAAc,CAAC,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,MAG/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;CA8B3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;CA8B9B,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified status color mappings
|
|
3
|
+
* Consolidates duplicate color assignments for consistent UI styling
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Unified mapping of status states to Tailwind CSS color classes
|
|
7
|
+
* Groups similar states that should have the same visual treatment
|
|
8
|
+
*/
|
|
9
|
+
export const UNIFIED_STATUS_COLORS = {
|
|
10
|
+
// Pending/Waiting states - Warning color (amber/yellow)
|
|
11
|
+
pending: 'text-warning-600',
|
|
12
|
+
awaiting: 'text-warning-600',
|
|
13
|
+
pending_review: 'text-warning-600',
|
|
14
|
+
on_hold: 'text-warning-600',
|
|
15
|
+
// Processing/Active states - Primary color (blue)
|
|
16
|
+
processing: 'text-primary-600',
|
|
17
|
+
in_progress: 'text-primary-600',
|
|
18
|
+
active: 'text-primary-600',
|
|
19
|
+
// Success states - Success color (green)
|
|
20
|
+
completed: 'text-success-700',
|
|
21
|
+
approved: 'text-success-600',
|
|
22
|
+
executed: 'text-success-600',
|
|
23
|
+
settled: 'text-success-600',
|
|
24
|
+
success: 'text-success-600',
|
|
25
|
+
// Error states - Error color (red)
|
|
26
|
+
failed: 'text-error-700',
|
|
27
|
+
rejected: 'text-error-600',
|
|
28
|
+
error: 'text-error-600',
|
|
29
|
+
// Neutral/Cancelled states - Subtle color (gray)
|
|
30
|
+
cancelled: 'text-content-subtle',
|
|
31
|
+
expired: 'text-content-subtle',
|
|
32
|
+
inactive: 'text-content-subtle',
|
|
33
|
+
closed: 'text-content-subtle',
|
|
34
|
+
default: 'text-content-subtle',
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Get color class for a status
|
|
38
|
+
* @param status - The status key (lowercase)
|
|
39
|
+
* @returns The Tailwind CSS color class
|
|
40
|
+
*/
|
|
41
|
+
export const getStatusColor = (status) => {
|
|
42
|
+
const normalizedStatus = status.toLowerCase().replace(/_/g, '_');
|
|
43
|
+
return UNIFIED_STATUS_COLORS[normalizedStatus] || UNIFIED_STATUS_COLORS.default;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Background color variants for status states
|
|
47
|
+
* Uses lighter shades for backgrounds
|
|
48
|
+
*/
|
|
49
|
+
export const UNIFIED_STATUS_BG_COLORS = {
|
|
50
|
+
// Pending/Waiting states
|
|
51
|
+
pending: 'bg-warning-50',
|
|
52
|
+
awaiting: 'bg-warning-50',
|
|
53
|
+
pending_review: 'bg-warning-50',
|
|
54
|
+
on_hold: 'bg-warning-50',
|
|
55
|
+
// Processing/Active states
|
|
56
|
+
processing: 'bg-primary-50',
|
|
57
|
+
in_progress: 'bg-primary-50',
|
|
58
|
+
active: 'bg-primary-50',
|
|
59
|
+
// Success states
|
|
60
|
+
completed: 'bg-success-50',
|
|
61
|
+
approved: 'bg-success-50',
|
|
62
|
+
executed: 'bg-success-50',
|
|
63
|
+
settled: 'bg-success-50',
|
|
64
|
+
success: 'bg-success-50',
|
|
65
|
+
// Error states
|
|
66
|
+
failed: 'bg-error-50',
|
|
67
|
+
rejected: 'bg-error-50',
|
|
68
|
+
error: 'bg-error-50',
|
|
69
|
+
// Neutral/Cancelled states
|
|
70
|
+
cancelled: 'bg-gray-50',
|
|
71
|
+
expired: 'bg-gray-50',
|
|
72
|
+
inactive: 'bg-gray-50',
|
|
73
|
+
closed: 'bg-gray-50',
|
|
74
|
+
default: 'bg-gray-50',
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Badge color combinations (background + text)
|
|
78
|
+
* For use in status badges and pills
|
|
79
|
+
*/
|
|
80
|
+
export const UNIFIED_STATUS_BADGE_COLORS = {
|
|
81
|
+
// Pending/Waiting states
|
|
82
|
+
pending: 'bg-warning-100 text-warning-700',
|
|
83
|
+
awaiting: 'bg-warning-100 text-warning-700',
|
|
84
|
+
pending_review: 'bg-warning-100 text-warning-700',
|
|
85
|
+
on_hold: 'bg-warning-100 text-warning-700',
|
|
86
|
+
// Processing/Active states
|
|
87
|
+
processing: 'bg-primary-100 text-primary-700',
|
|
88
|
+
in_progress: 'bg-primary-100 text-primary-700',
|
|
89
|
+
active: 'bg-primary-100 text-primary-700',
|
|
90
|
+
// Success states
|
|
91
|
+
completed: 'bg-success-100 text-success-700',
|
|
92
|
+
approved: 'bg-success-100 text-success-700',
|
|
93
|
+
executed: 'bg-success-100 text-success-700',
|
|
94
|
+
settled: 'bg-success-100 text-success-700',
|
|
95
|
+
success: 'bg-success-100 text-success-700',
|
|
96
|
+
// Error states
|
|
97
|
+
failed: 'bg-error-100 text-error-700',
|
|
98
|
+
rejected: 'bg-error-100 text-error-700',
|
|
99
|
+
error: 'bg-error-100 text-error-700',
|
|
100
|
+
// Neutral/Cancelled states
|
|
101
|
+
cancelled: 'bg-gray-100 text-gray-700',
|
|
102
|
+
expired: 'bg-gray-100 text-gray-700',
|
|
103
|
+
inactive: 'bg-gray-100 text-gray-700',
|
|
104
|
+
closed: 'bg-gray-100 text-gray-700',
|
|
105
|
+
default: 'bg-gray-100 text-gray-700',
|
|
106
|
+
};
|