sag_components 2.0.0-beta154 → 2.0.0-beta156
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 +2 -1
- package/dist/index.esm.js +45 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +45 -32
- package/dist/index.js.map +1 -1
- package/dist/types/components/QuickFilterCards/QuickFilterCards.d.ts +2 -1
- package/dist/types/components/Table/TableBody.styles.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34630,15 +34630,16 @@ styled.css`
|
|
|
34630
34630
|
* • onApply(start,end) – callback, both numbers (inclusive)
|
|
34631
34631
|
* • onCancel() – callback
|
|
34632
34632
|
*/
|
|
34633
|
-
const WeeksCalendar =
|
|
34634
|
-
|
|
34635
|
-
|
|
34636
|
-
|
|
34637
|
-
|
|
34638
|
-
|
|
34639
|
-
|
|
34640
|
-
|
|
34641
|
-
|
|
34633
|
+
const WeeksCalendar = _ref => {
|
|
34634
|
+
let {
|
|
34635
|
+
year,
|
|
34636
|
+
defaultStartWeek = null,
|
|
34637
|
+
defaultEndWeek = null,
|
|
34638
|
+
backgroundColor = "#066768",
|
|
34639
|
+
hoverBackgroundColor = "#E6F0F0",
|
|
34640
|
+
onApply,
|
|
34641
|
+
onCancel
|
|
34642
|
+
} = _ref;
|
|
34642
34643
|
// state -------------------------------------------------
|
|
34643
34644
|
const [startWeek, setStartWeek] = React$1.useState(defaultStartWeek);
|
|
34644
34645
|
const [endWeek, setEndWeek] = React$1.useState(defaultEndWeek);
|
|
@@ -38379,22 +38380,35 @@ const TagContainer = styled__default["default"].div`
|
|
|
38379
38380
|
display: flex;
|
|
38380
38381
|
flex-wrap: wrap;
|
|
38381
38382
|
gap: 4px;
|
|
38382
|
-
align-items:
|
|
38383
|
+
align-items: center; /* Center items vertically */
|
|
38384
|
+
justify-content: flex-start;
|
|
38383
38385
|
max-width: 100%;
|
|
38384
38386
|
line-height: 1.5;
|
|
38387
|
+
min-height: 32px; /* Ensure minimum height for centering */
|
|
38388
|
+
`;
|
|
38389
|
+
const TagChipTextWrapper = styled__default["default"].div`
|
|
38390
|
+
padding: 0 8px; /* Add consistent padding on left and right */
|
|
38391
|
+
white-space: nowrap;
|
|
38392
|
+
overflow: hidden;
|
|
38393
|
+
text-overflow: ellipsis;
|
|
38394
|
+
max-width: 100%;
|
|
38385
38395
|
`;
|
|
38386
38396
|
const TagChip = styled__default["default"].span`
|
|
38387
38397
|
display: inline-flex;
|
|
38388
38398
|
align-items: center;
|
|
38389
|
-
padding: 2px
|
|
38399
|
+
padding: 2px 0px;
|
|
38390
38400
|
font-size: 12px;
|
|
38391
38401
|
font-weight: 500;
|
|
38392
38402
|
border-radius: 9999px; /* Tailwind's rounded-full */
|
|
38393
|
-
white-space: nowrap;
|
|
38394
38403
|
font-family: "Poppins", sans-serif;
|
|
38395
38404
|
border: 1px solid;
|
|
38396
38405
|
line-height: 1.3;
|
|
38397
38406
|
|
|
38407
|
+
/* Handle min/max width - support minWidth */
|
|
38408
|
+
min-width: ${props => props.$minWidth || "auto"};
|
|
38409
|
+
max-width: ${props => props.$maxWidth || "100px"};
|
|
38410
|
+
width: ${props => props.$minWidth ? props.$minWidth : "auto"};
|
|
38411
|
+
|
|
38398
38412
|
/* Dynamic colors via CSS custom properties */
|
|
38399
38413
|
background-color: ${props => props.$backgroundColor || '#F3F4F6'};
|
|
38400
38414
|
color: ${props => props.$textColor || '#374151'};
|
|
@@ -38432,7 +38446,8 @@ const MultiTagWrapper = styled__default["default"].div`
|
|
|
38432
38446
|
flex-wrap: wrap;
|
|
38433
38447
|
gap: 4px;
|
|
38434
38448
|
max-width: 100%;
|
|
38435
|
-
align-items:
|
|
38449
|
+
align-items: center; /* Center multiple tags vertically */
|
|
38450
|
+
min-height: 32px; /* Ensure minimum height for centering */
|
|
38436
38451
|
`;
|
|
38437
38452
|
const TextareaWrapper = styled__default["default"].div`
|
|
38438
38453
|
position: relative;
|
|
@@ -38924,33 +38939,30 @@ const TableBody = ({
|
|
|
38924
38939
|
const maxDisplay = tagConfig.maxDisplay || 3;
|
|
38925
38940
|
const isMultiple = tagConfig.multiple !== false; // Default to true
|
|
38926
38941
|
|
|
38927
|
-
//
|
|
38928
|
-
|
|
38929
|
-
const colorConfig = colors[
|
|
38930
|
-
|
|
38942
|
+
// Helper function to create a tag chip with proper tooltip
|
|
38943
|
+
const createTagChip = (tagValue, index = 0) => {
|
|
38944
|
+
const colorConfig = colors[tagValue] || defaultColor;
|
|
38945
|
+
const formattedText = formatTagText(tagValue);
|
|
38946
|
+
return /*#__PURE__*/React__default["default"].createElement(TagChip, {
|
|
38947
|
+
key: `${tagValue}-${index}`,
|
|
38931
38948
|
$backgroundColor: colorConfig.bg,
|
|
38932
38949
|
$textColor: colorConfig.text,
|
|
38933
38950
|
$borderColor: colorConfig.border,
|
|
38934
38951
|
$interactive: false,
|
|
38935
|
-
title:
|
|
38936
|
-
},
|
|
38952
|
+
title: formattedText // Always show full text in tooltip
|
|
38953
|
+
}, /*#__PURE__*/React__default["default"].createElement(TagChipTextWrapper, null, formattedText));
|
|
38954
|
+
};
|
|
38955
|
+
|
|
38956
|
+
// Handle single tag
|
|
38957
|
+
if (typeof value === 'string') {
|
|
38958
|
+
return /*#__PURE__*/React__default["default"].createElement(TagContainer, null, createTagChip(value));
|
|
38937
38959
|
}
|
|
38938
38960
|
|
|
38939
38961
|
// Handle multiple tags
|
|
38940
38962
|
if (Array.isArray(value) && isMultiple) {
|
|
38941
38963
|
const visibleTags = value.slice(0, maxDisplay);
|
|
38942
38964
|
const remainingCount = value.length - maxDisplay;
|
|
38943
|
-
return /*#__PURE__*/React__default["default"].createElement(TagContainer, null, /*#__PURE__*/React__default["default"].createElement(MultiTagWrapper, null, visibleTags.map((tag, index) => {
|
|
38944
|
-
const colorConfig = colors[tag] || defaultColor;
|
|
38945
|
-
return /*#__PURE__*/React__default["default"].createElement(TagChip, {
|
|
38946
|
-
key: `${tag}-${index}`,
|
|
38947
|
-
$backgroundColor: colorConfig.bg,
|
|
38948
|
-
$textColor: colorConfig.text,
|
|
38949
|
-
$borderColor: colorConfig.border,
|
|
38950
|
-
$interactive: false,
|
|
38951
|
-
title: tag
|
|
38952
|
-
}, formatTagText(tag));
|
|
38953
|
-
}), remainingCount > 0 && /*#__PURE__*/React__default["default"].createElement(TagOverflow, {
|
|
38965
|
+
return /*#__PURE__*/React__default["default"].createElement(TagContainer, null, /*#__PURE__*/React__default["default"].createElement(MultiTagWrapper, null, visibleTags.map((tag, index) => createTagChip(tag, index)), remainingCount > 0 && /*#__PURE__*/React__default["default"].createElement(TagOverflow, {
|
|
38954
38966
|
title: `${remainingCount} more: ${value.slice(maxDisplay).map(tag => formatTagText(tag)).join(', ')}`
|
|
38955
38967
|
}, "+", remainingCount)));
|
|
38956
38968
|
}
|
|
@@ -53347,7 +53359,8 @@ const QuickFilterCards = _ref => {
|
|
|
53347
53359
|
let {
|
|
53348
53360
|
data = [],
|
|
53349
53361
|
onCardToggle = () => {},
|
|
53350
|
-
width = "100%"
|
|
53362
|
+
width = "100%",
|
|
53363
|
+
CardsContainerClassName = "QuickFilterCardsContainer"
|
|
53351
53364
|
} = _ref;
|
|
53352
53365
|
// local mirror so UI updates immediately even if parent is slow/not controlling
|
|
53353
53366
|
const [items, setItems] = React$1.useState(data);
|
|
@@ -53366,7 +53379,7 @@ const QuickFilterCards = _ref => {
|
|
|
53366
53379
|
};
|
|
53367
53380
|
return /*#__PURE__*/React__default["default"].createElement(CardsContainer, {
|
|
53368
53381
|
width: width,
|
|
53369
|
-
className:
|
|
53382
|
+
className: CardsContainerClassName
|
|
53370
53383
|
}, items.map(_ref2 => {
|
|
53371
53384
|
let {
|
|
53372
53385
|
status,
|