sag_components 2.0.0-beta218 → 2.0.0-beta219
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.esm.js +84 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +84 -32
- package/dist/index.js.map +1 -1
- package/dist/types/components/Table/TableBody.styles.d.ts +1 -0
- package/dist/types/components/Table/data.d.ts +17 -0
- package/dist/types/icons/HeroIcon.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -36075,12 +36075,9 @@ const ToggleSwitchLabel = styled.label`
|
|
|
36075
36075
|
position: relative;
|
|
36076
36076
|
cursor: pointer;
|
|
36077
36077
|
user-select: none;
|
|
36078
|
-
opacity: ${
|
|
36079
|
-
|
|
36080
|
-
|
|
36081
|
-
} = _ref;
|
|
36082
|
-
return disabled ? 0.5 : 1;
|
|
36083
|
-
}};
|
|
36078
|
+
opacity: ${({
|
|
36079
|
+
disabled
|
|
36080
|
+
}) => disabled ? 0.5 : 1};
|
|
36084
36081
|
`;
|
|
36085
36082
|
const ToggleInput = styled.input`
|
|
36086
36083
|
display: none;
|
|
@@ -36088,19 +36085,15 @@ const ToggleInput = styled.input`
|
|
|
36088
36085
|
const ToggleSlider = styled.span`
|
|
36089
36086
|
display: block;
|
|
36090
36087
|
position: relative;
|
|
36091
|
-
background: ${
|
|
36092
|
-
|
|
36093
|
-
|
|
36094
|
-
|
|
36095
|
-
} = _ref2;
|
|
36096
|
-
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
36097
|
-
}};
|
|
36088
|
+
background: ${({
|
|
36089
|
+
checked,
|
|
36090
|
+
disabled
|
|
36091
|
+
}) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
|
|
36098
36092
|
border-radius: 999px;
|
|
36099
36093
|
transition: background 0.2s;
|
|
36100
|
-
${
|
|
36101
|
-
|
|
36102
|
-
|
|
36103
|
-
} = _ref3;
|
|
36094
|
+
${({
|
|
36095
|
+
size
|
|
36096
|
+
}) => {
|
|
36104
36097
|
switch (size) {
|
|
36105
36098
|
case "s":
|
|
36106
36099
|
return css`width: 40px; height: 20px;`;
|
|
@@ -36119,10 +36112,9 @@ const ToggleSlider = styled.span`
|
|
|
36119
36112
|
background: #fff;
|
|
36120
36113
|
border-radius: 50%;
|
|
36121
36114
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
36122
|
-
${
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
} = _ref4;
|
|
36115
|
+
${({
|
|
36116
|
+
size
|
|
36117
|
+
}) => {
|
|
36126
36118
|
switch (size) {
|
|
36127
36119
|
case "s":
|
|
36128
36120
|
return css`width: 14px; height: 14px;`;
|
|
@@ -36132,11 +36124,10 @@ const ToggleSlider = styled.span`
|
|
|
36132
36124
|
return css`width: 20px; height: 20px;`;
|
|
36133
36125
|
}
|
|
36134
36126
|
}}
|
|
36135
|
-
left: ${
|
|
36136
|
-
|
|
36137
|
-
|
|
36138
|
-
|
|
36139
|
-
} = _ref5;
|
|
36127
|
+
left: ${({
|
|
36128
|
+
checked,
|
|
36129
|
+
size
|
|
36130
|
+
}) => {
|
|
36140
36131
|
if (!checked) return "3px";
|
|
36141
36132
|
switch (size) {
|
|
36142
36133
|
case "s":
|
|
@@ -36150,9 +36141,9 @@ const ToggleSlider = styled.span`
|
|
|
36150
36141
|
}
|
|
36151
36142
|
`;
|
|
36152
36143
|
|
|
36153
|
-
/**
|
|
36154
|
-
* ToggleSwitch component for on/off states.
|
|
36155
|
-
* Supports small/large sizes and disabled state.
|
|
36144
|
+
/**
|
|
36145
|
+
* ToggleSwitch component for on/off states.
|
|
36146
|
+
* Supports small/large sizes and disabled state.
|
|
36156
36147
|
*/
|
|
36157
36148
|
function ToggleSwitch(_ref) {
|
|
36158
36149
|
let {
|
|
@@ -39624,6 +39615,14 @@ styled.div`
|
|
|
39624
39615
|
}
|
|
39625
39616
|
`}
|
|
39626
39617
|
`;
|
|
39618
|
+
const HeroButton = styled.button`
|
|
39619
|
+
display: flex;
|
|
39620
|
+
align-items: center;
|
|
39621
|
+
justify-content: center;
|
|
39622
|
+
cursor: pointer;
|
|
39623
|
+
background-color: transparent;
|
|
39624
|
+
border: none;
|
|
39625
|
+
`;
|
|
39627
39626
|
|
|
39628
39627
|
// MessageBox.styles.js
|
|
39629
39628
|
const ModalOverlay = styled.div`
|
|
@@ -40087,6 +40086,38 @@ Dropdown.propTypes = {
|
|
|
40087
40086
|
placeholder: PropTypes.string
|
|
40088
40087
|
};
|
|
40089
40088
|
|
|
40089
|
+
const HeroIcon = ({
|
|
40090
|
+
width = '12',
|
|
40091
|
+
height = '16',
|
|
40092
|
+
full = false
|
|
40093
|
+
}) => full ? /*#__PURE__*/React$1.createElement("svg", {
|
|
40094
|
+
width: width,
|
|
40095
|
+
height: height,
|
|
40096
|
+
viewBox: "0 0 12 16",
|
|
40097
|
+
fill: "none",
|
|
40098
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
40099
|
+
}, /*#__PURE__*/React$1.createElement("path", {
|
|
40100
|
+
d: "M0 1.5V15.2406C0 15.6594 0.340625 16 0.759375 16C0.915625 16 1.06875 15.9531 1.19687 15.8625L6 12.5L10.8031 15.8625C10.9313 15.9531 11.0844 16 11.2406 16C11.6594 16 12 15.6594 12 15.2406V1.5C12 0.671875 11.3281 0 10.5 0H1.5C0.671875 0 0 0.671875 0 1.5Z",
|
|
40101
|
+
fill: "#066768"
|
|
40102
|
+
})) : /*#__PURE__*/React$1.createElement("svg", {
|
|
40103
|
+
width: width,
|
|
40104
|
+
height: height,
|
|
40105
|
+
viewBox: "0 0 12 16",
|
|
40106
|
+
fill: "none",
|
|
40107
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
40108
|
+
}, /*#__PURE__*/React$1.createElement("g", {
|
|
40109
|
+
"clip-path": "url(#clip0_2338_96732)"
|
|
40110
|
+
}, /*#__PURE__*/React$1.createElement("path", {
|
|
40111
|
+
d: "M0 1.5C0 0.671875 0.671875 0 1.5 0H10.5C11.3281 0 12 0.671875 12 1.5V15.3094C12 15.6906 11.6906 16 11.3094 16C11.1719 16 11.0406 15.9594 10.925 15.8844L6 12.6L1.075 15.8844C0.9625 15.9594 0.828125 16 0.690625 16C0.309375 16 0 15.6906 0 15.3094V1.5ZM1.5 1C1.225 1 1 1.225 1 1.5V14.7312L5.72188 11.5844C5.89062 11.4719 6.10938 11.4719 6.27812 11.5844L11 14.7312V1.5C11 1.225 10.775 1 10.5 1H1.5Z",
|
|
40112
|
+
fill: "#066768"
|
|
40113
|
+
})), /*#__PURE__*/React$1.createElement("defs", null, /*#__PURE__*/React$1.createElement("clipPath", {
|
|
40114
|
+
id: "clip0_2338_96732"
|
|
40115
|
+
}, /*#__PURE__*/React$1.createElement("rect", {
|
|
40116
|
+
width: "12",
|
|
40117
|
+
height: "16",
|
|
40118
|
+
fill: "white"
|
|
40119
|
+
}))));
|
|
40120
|
+
|
|
40090
40121
|
// combinedShimmerHooks.js - Chrome shimmer effect integrated with your hooks
|
|
40091
40122
|
|
|
40092
40123
|
// Chrome Shimmer Component
|
|
@@ -40186,7 +40217,8 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
40186
40217
|
expandedBackgroundColor = "#E6F0F0",
|
|
40187
40218
|
onDropdownSelected = () => {},
|
|
40188
40219
|
onCheckboxClick = () => {},
|
|
40189
|
-
onHeaderCheckboxClick = () => {}
|
|
40220
|
+
onHeaderCheckboxClick = () => {},
|
|
40221
|
+
onHeroClick = () => {}
|
|
40190
40222
|
}, ref) => {
|
|
40191
40223
|
// MOVE ALL VALIDATION TO THE VERY TOP BEFORE ANY HOOKS
|
|
40192
40224
|
if (!Array.isArray(data) || !Array.isArray(columns)) {
|
|
@@ -40724,6 +40756,23 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
40724
40756
|
console.warn('Error formatting checkbox:', e);
|
|
40725
40757
|
return String(value || "");
|
|
40726
40758
|
}
|
|
40759
|
+
case "hero":
|
|
40760
|
+
try {
|
|
40761
|
+
if (value === null || value === undefined) return null;
|
|
40762
|
+
return /*#__PURE__*/React$1.createElement(HeroButton, {
|
|
40763
|
+
onClick: e => {
|
|
40764
|
+
// e.stopPropagation();
|
|
40765
|
+
if (onHeroClick) {
|
|
40766
|
+
onHeroClick(row, !value);
|
|
40767
|
+
}
|
|
40768
|
+
}
|
|
40769
|
+
}, /*#__PURE__*/React$1.createElement(HeroIcon, {
|
|
40770
|
+
full: Boolean(value)
|
|
40771
|
+
}));
|
|
40772
|
+
} catch (e) {
|
|
40773
|
+
console.warn('Error formatting hero icon:', e);
|
|
40774
|
+
return null;
|
|
40775
|
+
}
|
|
40727
40776
|
default:
|
|
40728
40777
|
return String(value || "");
|
|
40729
40778
|
}
|
|
@@ -40957,7 +41006,8 @@ TableBody.propTypes = {
|
|
|
40957
41006
|
expandedBackgroundColor: PropTypes.string,
|
|
40958
41007
|
onDropdownSelected: PropTypes.func,
|
|
40959
41008
|
onCheckboxClick: PropTypes.func,
|
|
40960
|
-
onHeaderCheckboxClick: PropTypes.func
|
|
41009
|
+
onHeaderCheckboxClick: PropTypes.func,
|
|
41010
|
+
onHeroClick: PropTypes.func
|
|
40961
41011
|
};
|
|
40962
41012
|
TableBody.displayName = "TableBody";
|
|
40963
41013
|
|
|
@@ -44320,6 +44370,7 @@ const Table = props => {
|
|
|
44320
44370
|
onCheckboxClick = () => {},
|
|
44321
44371
|
onHeaderCheckboxClick = () => {},
|
|
44322
44372
|
headerCheckboxStates = {},
|
|
44373
|
+
onHeroClick = () => {},
|
|
44323
44374
|
// Accept ref as a regular prop
|
|
44324
44375
|
ref = null
|
|
44325
44376
|
} = props;
|
|
@@ -44471,7 +44522,8 @@ const Table = props => {
|
|
|
44471
44522
|
expandedBackgroundColor: expandedBackgroundColor,
|
|
44472
44523
|
onDropdownSelected: onDropdownSelected,
|
|
44473
44524
|
onCheckboxClick: onCheckboxClick,
|
|
44474
|
-
onHeaderCheckboxClick: onHeaderCheckboxClick
|
|
44525
|
+
onHeaderCheckboxClick: onHeaderCheckboxClick,
|
|
44526
|
+
onHeroClick: onHeroClick
|
|
44475
44527
|
})), data.length === 0 && /*#__PURE__*/React$1.createElement(NoEventsParent, null, /*#__PURE__*/React$1.createElement(NoEventsWrapper, null, showNoDataInSearch ? getNoDataSearchIcon(noDataSearchIcon) : getNoDataIcon(noDataIcon)), /*#__PURE__*/React$1.createElement(NoEventsMessage, null, showNoDataInSearch ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("strong", null, noDataInSearchTitle), /*#__PURE__*/React$1.createElement("br", null), noDataInSearchMessage) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("strong", null, noEventsTitle), /*#__PURE__*/React$1.createElement("br", null), noEventsSubtitle)), !showNoDataInSearch && showNoEventsButton && /*#__PURE__*/React$1.createElement(Button$1, {
|
|
44476
44528
|
height: "45px",
|
|
44477
44529
|
leftIcon: noEventsButtonIcon,
|