sag_components 2.0.0-beta164 → 2.0.0-beta166
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/index.d.ts +4 -2
- package/dist/index.esm.js +95 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +95 -22
- package/dist/index.js.map +1 -1
- package/dist/types/components/ModalDrawer/ModalDrawer.d.ts +1 -1
- package/dist/types/components/Tag/Tag.d.ts +2 -0
- package/dist/types/components/Tag/Tag.stories.d.ts +112 -0
- package/dist/types/components/Tag/Tag.style.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3159,17 +3159,17 @@ const UploadIcon = _ref => {
|
|
|
3159
3159
|
|
|
3160
3160
|
const UploadIconV2 = _ref => {
|
|
3161
3161
|
let {
|
|
3162
|
-
color = '
|
|
3162
|
+
color = '#066768',
|
|
3163
3163
|
width = '14',
|
|
3164
3164
|
height = '14'
|
|
3165
3165
|
} = _ref;
|
|
3166
|
-
return /*#__PURE__*/
|
|
3166
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3167
3167
|
width: width,
|
|
3168
3168
|
height: height,
|
|
3169
3169
|
viewBox: "0 0 14 14",
|
|
3170
3170
|
fill: "none",
|
|
3171
3171
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3172
|
-
}, /*#__PURE__*/
|
|
3172
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3173
3173
|
d: "M7.4175 1.75616V9.91557C7.4175 10.1447 7.23005 10.3321 7.00094 10.3321C6.77183 10.3321 6.58437 10.1447 6.58437 9.91557V1.75616L3.96263 4.3779C3.80122 4.53931 3.53566 4.53931 3.37424 4.3779C3.21282 4.21648 3.21282 3.95092 3.37424 3.7895L6.70674 0.457001C6.86816 0.295583 7.13372 0.295583 7.29513 0.457001L10.6276 3.7895C10.7891 3.95092 10.7891 4.21648 10.6276 4.3779C10.4662 4.53931 10.2007 4.53931 10.0392 4.3779L7.4175 1.75616ZM5.75125 9.49901H2.00219C1.54137 9.49901 1.16906 9.87131 1.16906 10.3321V11.9984C1.16906 12.4592 1.54137 12.8315 2.00219 12.8315H11.9997C12.4605 12.8315 12.8328 12.4592 12.8328 11.9984V10.3321C12.8328 9.87131 12.4605 9.49901 11.9997 9.49901H8.25063V8.66589H11.9997C12.9187 8.66589 13.6659 9.4131 13.6659 10.3321V11.9984C13.6659 12.9174 12.9187 13.6646 11.9997 13.6646H2.00219C1.08315 13.6646 0.335938 12.9174 0.335938 11.9984V10.3321C0.335938 9.4131 1.08315 8.66589 2.00219 8.66589H5.75125V9.49901ZM10.3334 11.1653C10.3334 10.9995 10.3993 10.8406 10.5164 10.7234C10.6336 10.6062 10.7926 10.5404 10.9583 10.5404C11.124 10.5404 11.2829 10.6062 11.4001 10.7234C11.5173 10.8406 11.5831 10.9995 11.5831 11.1653C11.5831 11.331 11.5173 11.4899 11.4001 11.6071C11.2829 11.7243 11.124 11.7901 10.9583 11.7901C10.7926 11.7901 10.6336 11.7243 10.5164 11.6071C10.3993 11.4899 10.3334 11.331 10.3334 11.1653Z",
|
|
3174
3174
|
fill: color
|
|
3175
3175
|
}));
|
|
@@ -34715,15 +34715,16 @@ styled.css`
|
|
|
34715
34715
|
* • onApply(start,end) – callback, both numbers (inclusive)
|
|
34716
34716
|
* • onCancel() – callback
|
|
34717
34717
|
*/
|
|
34718
|
-
const WeeksCalendar =
|
|
34719
|
-
|
|
34720
|
-
|
|
34721
|
-
|
|
34722
|
-
|
|
34723
|
-
|
|
34724
|
-
|
|
34725
|
-
|
|
34726
|
-
|
|
34718
|
+
const WeeksCalendar = _ref => {
|
|
34719
|
+
let {
|
|
34720
|
+
year,
|
|
34721
|
+
defaultStartWeek = null,
|
|
34722
|
+
defaultEndWeek = null,
|
|
34723
|
+
backgroundColor = "#066768",
|
|
34724
|
+
hoverBackgroundColor = "#E6F0F0",
|
|
34725
|
+
onApply,
|
|
34726
|
+
onCancel
|
|
34727
|
+
} = _ref;
|
|
34727
34728
|
// state -------------------------------------------------
|
|
34728
34729
|
const [startWeek, setStartWeek] = React$1.useState(defaultStartWeek);
|
|
34729
34730
|
const [endWeek, setEndWeek] = React$1.useState(defaultEndWeek);
|
|
@@ -35689,9 +35690,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35689
35690
|
}
|
|
35690
35691
|
`;
|
|
35691
35692
|
|
|
35692
|
-
/**
|
|
35693
|
-
* ToggleSwitch component for on/off states.
|
|
35694
|
-
* Supports small/large sizes and disabled state.
|
|
35693
|
+
/**
|
|
35694
|
+
* ToggleSwitch component for on/off states.
|
|
35695
|
+
* Supports small/large sizes and disabled state.
|
|
35695
35696
|
*/
|
|
35696
35697
|
function ToggleSwitch(_ref) {
|
|
35697
35698
|
let {
|
|
@@ -38513,7 +38514,7 @@ const DisabledTrashIconWrapper$1 = styled__default["default"].div`
|
|
|
38513
38514
|
color: #d9d9d9;
|
|
38514
38515
|
}
|
|
38515
38516
|
`;
|
|
38516
|
-
const StatusCell = styled__default["default"].div`
|
|
38517
|
+
const StatusCell$1 = styled__default["default"].div`
|
|
38517
38518
|
font-size: 12px;
|
|
38518
38519
|
font-weight: 500;
|
|
38519
38520
|
display: flex;
|
|
@@ -39223,7 +39224,7 @@ const TableBody = ({
|
|
|
39223
39224
|
case 'status':
|
|
39224
39225
|
const statusObj = statuses.find(status => status.status === value) || {};
|
|
39225
39226
|
const [palette0, palette1] = statusObj.palette;
|
|
39226
|
-
return /*#__PURE__*/React__default["default"].createElement(StatusCell, {
|
|
39227
|
+
return /*#__PURE__*/React__default["default"].createElement(StatusCell$1, {
|
|
39227
39228
|
color: palette1
|
|
39228
39229
|
}, /*#__PURE__*/React__default["default"].createElement(StatusCellCircle, {
|
|
39229
39230
|
backgroundColor: palette0
|
|
@@ -52811,7 +52812,8 @@ const Drawer = styled__default["default"].div`
|
|
|
52811
52812
|
top: 0;
|
|
52812
52813
|
right: ${props => props.open ? '0' : `-${props.widthPercent || 70}%`};
|
|
52813
52814
|
width: ${props => props.widthPercent ? `${props.widthPercent}%` : '70%'};
|
|
52814
|
-
height: 100
|
|
52815
|
+
height: ${props => props.height ? props.height : '100%'};
|
|
52816
|
+
|
|
52815
52817
|
background: #fff;
|
|
52816
52818
|
z-index: 1001;
|
|
52817
52819
|
transition: right 0.3s;
|
|
@@ -52847,6 +52849,7 @@ const CloseBtn = styled__default["default"].button`
|
|
|
52847
52849
|
function ModalDrawer(_ref) {
|
|
52848
52850
|
let {
|
|
52849
52851
|
open,
|
|
52852
|
+
height,
|
|
52850
52853
|
onClose,
|
|
52851
52854
|
children,
|
|
52852
52855
|
widthPercent = 70
|
|
@@ -52855,6 +52858,7 @@ function ModalDrawer(_ref) {
|
|
|
52855
52858
|
onClick: onClose,
|
|
52856
52859
|
"data-testid": "overlay"
|
|
52857
52860
|
}), /*#__PURE__*/React__default["default"].createElement(Drawer, {
|
|
52861
|
+
height: height,
|
|
52858
52862
|
open: open,
|
|
52859
52863
|
widthPercent: widthPercent,
|
|
52860
52864
|
"data-testid": "drawer"
|
|
@@ -52926,10 +52930,11 @@ const DropdownList = styled__default["default"].ul`
|
|
|
52926
52930
|
`}
|
|
52927
52931
|
`;
|
|
52928
52932
|
const SectionDiv = styled__default["default"].div`
|
|
52929
|
-
${
|
|
52930
|
-
|
|
52931
|
-
|
|
52932
|
-
|
|
52933
|
+
${_ref => {
|
|
52934
|
+
let {
|
|
52935
|
+
$showBorder,
|
|
52936
|
+
margin
|
|
52937
|
+
} = _ref;
|
|
52933
52938
|
switch ($showBorder) {
|
|
52934
52939
|
case 'Template Offer':
|
|
52935
52940
|
return styled.css`border-top: 1px solid #e6e2e2ff;
|
|
@@ -53877,6 +53882,73 @@ const QuickFilterCards = _ref => {
|
|
|
53877
53882
|
}));
|
|
53878
53883
|
};
|
|
53879
53884
|
|
|
53885
|
+
const StatusCell = styled__default["default"].div`
|
|
53886
|
+
display: inline-flex;
|
|
53887
|
+
height: ${props => props.height};
|
|
53888
|
+
padding: 8px 12px;
|
|
53889
|
+
justify-content: center;
|
|
53890
|
+
align-items: center;
|
|
53891
|
+
gap: 14px;
|
|
53892
|
+
flex-shrink: 0;
|
|
53893
|
+
border-radius: ${props => props.borderRadius};
|
|
53894
|
+
border: 1px solid ${props => props.borderColor.toString()};
|
|
53895
|
+
background: ${props => props.backgroundColor.toString()};
|
|
53896
|
+
font-size: 14px;
|
|
53897
|
+
font-weight: 500;
|
|
53898
|
+
color: ${props => props.color.toString()};
|
|
53899
|
+
font-family: Poppins;
|
|
53900
|
+
font-style: normal;
|
|
53901
|
+
font-weight: 500;
|
|
53902
|
+
line-height: normal;
|
|
53903
|
+
`;
|
|
53904
|
+
|
|
53905
|
+
const tagTemplates = {
|
|
53906
|
+
pending: {
|
|
53907
|
+
backgroundColor: '#F5C9A74D',
|
|
53908
|
+
borderColor: '#F5C9A7',
|
|
53909
|
+
textColor: '#8B4513',
|
|
53910
|
+
text: 'Pending'
|
|
53911
|
+
},
|
|
53912
|
+
received: {
|
|
53913
|
+
backgroundColor: '#B9D5D54D',
|
|
53914
|
+
borderColor: '#B9D5D5',
|
|
53915
|
+
textColor: '#000000',
|
|
53916
|
+
text: 'Received'
|
|
53917
|
+
},
|
|
53918
|
+
approved: {
|
|
53919
|
+
backgroundColor: '#BFEBC64D',
|
|
53920
|
+
borderColor: '#BFEBC6',
|
|
53921
|
+
textColor: '#074310',
|
|
53922
|
+
text: 'Approved'
|
|
53923
|
+
},
|
|
53924
|
+
canceled: {
|
|
53925
|
+
backgroundColor: '#EBA6AF4D',
|
|
53926
|
+
borderColor: '#EBA6AF',
|
|
53927
|
+
textColor: '#44070F',
|
|
53928
|
+
text: 'Canceled'
|
|
53929
|
+
}
|
|
53930
|
+
};
|
|
53931
|
+
const Tag = props => {
|
|
53932
|
+
const {
|
|
53933
|
+
type = 'pending',
|
|
53934
|
+
size = 'small',
|
|
53935
|
+
backgroundColor,
|
|
53936
|
+
borderColor,
|
|
53937
|
+
textColor,
|
|
53938
|
+
borderRadius = "62px",
|
|
53939
|
+
text
|
|
53940
|
+
} = props;
|
|
53941
|
+
const template = tagTemplates[type];
|
|
53942
|
+
const height = size === 'small' ? '21px' : size === 'medium' ? '32px' : '35px';
|
|
53943
|
+
return /*#__PURE__*/React__default["default"].createElement(StatusCell, {
|
|
53944
|
+
backgroundColor: backgroundColor || template.backgroundColor,
|
|
53945
|
+
borderColor: borderColor || template.borderColor,
|
|
53946
|
+
color: textColor || template.textColor,
|
|
53947
|
+
height: height,
|
|
53948
|
+
borderRadius: borderRadius
|
|
53949
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, text || template.text));
|
|
53950
|
+
};
|
|
53951
|
+
|
|
53880
53952
|
exports.AdvancedThresholds = AdvancedThresholds;
|
|
53881
53953
|
exports.Analytics = Analytics;
|
|
53882
53954
|
exports.AreaChart = AreaChart;
|
|
@@ -53941,6 +54013,7 @@ exports.SingleBarLineCharts = SingleBarLineCharts;
|
|
|
53941
54013
|
exports.SortPop = SortPop;
|
|
53942
54014
|
exports.TabMenu = TabMenu;
|
|
53943
54015
|
exports.Table = Table;
|
|
54016
|
+
exports.Tag = Tag;
|
|
53944
54017
|
exports.ToasterMessageBox = ToasterMessageBox;
|
|
53945
54018
|
exports.ToggleSwitch = ToggleSwitch;
|
|
53946
54019
|
exports.Tooltip = Tooltip$2;
|