@fixefy/fixefy-ui-components 0.2.83 → 0.2.85
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/FxChip/FxChip.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EntityStatusType, ChargeStateType, InvoiceStateType, RecoStateType } from '@fixefy/fixefy-ui-utils';
|
|
3
3
|
export interface ChipPropsType {
|
|
4
|
-
type?: 'status' | 'priority' | 'score' | 'dimension';
|
|
4
|
+
type?: 'status' | 'priority' | 'score' | 'dimension' | 'reco';
|
|
5
5
|
status?: EntityStatusType | ChargeStateType | InvoiceStateType | RecoStateType;
|
|
6
6
|
label: string | number;
|
|
7
7
|
variant?: 'outlined' | 'filled';
|
package/dist/FxChip/FxChip.js
CHANGED
|
@@ -24,6 +24,12 @@ const FxChip = (props)=>{
|
|
|
24
24
|
const newStatus = status ? status.split(' ').join('_') : status;
|
|
25
25
|
const value = typeof label === 'number' ? label.toFixed(2) : label;
|
|
26
26
|
switch(type){
|
|
27
|
+
case 'reco':
|
|
28
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_chipstyles.RecoChipStyled, {
|
|
29
|
+
status: newStatus,
|
|
30
|
+
label: (0, _fixefyuiutils.titleCase)(value),
|
|
31
|
+
variant: variant
|
|
32
|
+
});
|
|
27
33
|
case 'status':
|
|
28
34
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_chipstyles.StatusChipStyled, {
|
|
29
35
|
status: newStatus,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const ScoreChipStyled: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
|
|
2
2
|
export declare const StatusChipStyled: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
|
|
3
3
|
export declare const PriorityChipStyled: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
|
|
4
|
+
export declare const RecoChipStyled: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
|
|
4
5
|
export declare const DimensionChipStyled: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
|
|
@@ -15,6 +15,9 @@ _export(exports, {
|
|
|
15
15
|
PriorityChipStyled: function() {
|
|
16
16
|
return PriorityChipStyled;
|
|
17
17
|
},
|
|
18
|
+
RecoChipStyled: function() {
|
|
19
|
+
return RecoChipStyled;
|
|
20
|
+
},
|
|
18
21
|
ScoreChipStyled: function() {
|
|
19
22
|
return ScoreChipStyled;
|
|
20
23
|
},
|
|
@@ -87,6 +90,28 @@ const PriorityChipStyled = (0, _styles.styled)(_material.Chip)(({ theme, status
|
|
|
87
90
|
border: `1px solid ${border}`
|
|
88
91
|
};
|
|
89
92
|
});
|
|
93
|
+
const RecoChipStyled = (0, _styles.styled)(_material.Chip)(({ theme, status })=>{
|
|
94
|
+
var _theme_palette_recoState_status, _theme_palette_recoState, _theme_palette, _theme_palette_recoState_status1, _theme_palette_recoState1, _theme_palette1, _theme_palette_recoState_status2, _theme_palette_recoState2, _theme_palette2;
|
|
95
|
+
var _theme_palette_recoState_status_background;
|
|
96
|
+
const backgroundColor = (_theme_palette_recoState_status_background = theme === null || theme === void 0 ? void 0 : (_theme_palette = theme.palette) === null || _theme_palette === void 0 ? void 0 : (_theme_palette_recoState = _theme_palette.recoState) === null || _theme_palette_recoState === void 0 ? void 0 : (_theme_palette_recoState_status = _theme_palette_recoState[status]) === null || _theme_palette_recoState_status === void 0 ? void 0 : _theme_palette_recoState_status.background) !== null && _theme_palette_recoState_status_background !== void 0 ? _theme_palette_recoState_status_background : '#8B9092';
|
|
97
|
+
var _theme_palette_recoState_status_label;
|
|
98
|
+
const labelColor = (_theme_palette_recoState_status_label = theme === null || theme === void 0 ? void 0 : (_theme_palette1 = theme.palette) === null || _theme_palette1 === void 0 ? void 0 : (_theme_palette_recoState1 = _theme_palette1.recoState) === null || _theme_palette_recoState1 === void 0 ? void 0 : (_theme_palette_recoState_status1 = _theme_palette_recoState1[status]) === null || _theme_palette_recoState_status1 === void 0 ? void 0 : _theme_palette_recoState_status1.label) !== null && _theme_palette_recoState_status_label !== void 0 ? _theme_palette_recoState_status_label : '#F6F9FA';
|
|
99
|
+
var _theme_palette_recoState_status_border;
|
|
100
|
+
const border = (_theme_palette_recoState_status_border = theme === null || theme === void 0 ? void 0 : (_theme_palette2 = theme.palette) === null || _theme_palette2 === void 0 ? void 0 : (_theme_palette_recoState2 = _theme_palette2.recoState) === null || _theme_palette_recoState2 === void 0 ? void 0 : (_theme_palette_recoState_status2 = _theme_palette_recoState2[status]) === null || _theme_palette_recoState_status2 === void 0 ? void 0 : _theme_palette_recoState_status2.border) !== null && _theme_palette_recoState_status_border !== void 0 ? _theme_palette_recoState_status_border : '#8B9092';
|
|
101
|
+
return {
|
|
102
|
+
height: 20,
|
|
103
|
+
minWidth: 80,
|
|
104
|
+
maxWidth: 120,
|
|
105
|
+
['& .MuiChip-label']: {
|
|
106
|
+
fontSize: 9,
|
|
107
|
+
fontWeight: 600,
|
|
108
|
+
lineHeight: '12px',
|
|
109
|
+
color: labelColor ? labelColor : theme.palette.statistics.label
|
|
110
|
+
},
|
|
111
|
+
backgroundColor,
|
|
112
|
+
border: `1px solid ${border}`
|
|
113
|
+
};
|
|
114
|
+
});
|
|
90
115
|
const DimensionChipStyled = (0, _styles.styled)(_material.Chip)(({ minimized })=>{
|
|
91
116
|
return {
|
|
92
117
|
height: '36px',
|
package/package.json
CHANGED