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 CHANGED
@@ -1590,10 +1590,11 @@ declare function ToasterMessageBox({ color, messageText, linkText, duration, wid
1590
1590
  onClose?: () => void;
1591
1591
  }): react_jsx_runtime.JSX.Element;
1592
1592
 
1593
- declare function QuickFilterCards({ data, onCardToggle, width, }: {
1593
+ declare function QuickFilterCards({ data, onCardToggle, width, CardsContainerClassName, }: {
1594
1594
  data?: any[];
1595
1595
  onCardToggle?: () => void;
1596
1596
  width?: string;
1597
+ CardsContainerClassName?: string;
1597
1598
  }): react_jsx_runtime.JSX.Element;
1598
1599
 
1599
1600
  declare function RangePicker({ label, onChange, borderRadius, required, width, height, placeholder, disabled, borderColor, borderColorFocus, textColor, selectedValue, }: {
package/dist/index.esm.js CHANGED
@@ -34620,15 +34620,16 @@ css`
34620
34620
  * • onApply(start,end) – callback, both numbers (inclusive)
34621
34621
  * • onCancel() – callback
34622
34622
  */
34623
- const WeeksCalendar = ({
34624
- year,
34625
- defaultStartWeek = null,
34626
- defaultEndWeek = null,
34627
- backgroundColor = "#066768",
34628
- hoverBackgroundColor = "#E6F0F0",
34629
- onApply,
34630
- onCancel
34631
- }) => {
34623
+ const WeeksCalendar = _ref => {
34624
+ let {
34625
+ year,
34626
+ defaultStartWeek = null,
34627
+ defaultEndWeek = null,
34628
+ backgroundColor = "#066768",
34629
+ hoverBackgroundColor = "#E6F0F0",
34630
+ onApply,
34631
+ onCancel
34632
+ } = _ref;
34632
34633
  // state -------------------------------------------------
34633
34634
  const [startWeek, setStartWeek] = useState(defaultStartWeek);
34634
34635
  const [endWeek, setEndWeek] = useState(defaultEndWeek);
@@ -38369,22 +38370,35 @@ const TagContainer = styled.div`
38369
38370
  display: flex;
38370
38371
  flex-wrap: wrap;
38371
38372
  gap: 4px;
38372
- align-items: flex-start;
38373
+ align-items: center; /* Center items vertically */
38374
+ justify-content: flex-start;
38373
38375
  max-width: 100%;
38374
38376
  line-height: 1.5;
38377
+ min-height: 32px; /* Ensure minimum height for centering */
38378
+ `;
38379
+ const TagChipTextWrapper = styled.div`
38380
+ padding: 0 8px; /* Add consistent padding on left and right */
38381
+ white-space: nowrap;
38382
+ overflow: hidden;
38383
+ text-overflow: ellipsis;
38384
+ max-width: 100%;
38375
38385
  `;
38376
38386
  const TagChip = styled.span`
38377
38387
  display: inline-flex;
38378
38388
  align-items: center;
38379
- padding: 2px 8px;
38389
+ padding: 2px 0px;
38380
38390
  font-size: 12px;
38381
38391
  font-weight: 500;
38382
38392
  border-radius: 9999px; /* Tailwind's rounded-full */
38383
- white-space: nowrap;
38384
38393
  font-family: "Poppins", sans-serif;
38385
38394
  border: 1px solid;
38386
38395
  line-height: 1.3;
38387
38396
 
38397
+ /* Handle min/max width - support minWidth */
38398
+ min-width: ${props => props.$minWidth || "auto"};
38399
+ max-width: ${props => props.$maxWidth || "100px"};
38400
+ width: ${props => props.$minWidth ? props.$minWidth : "auto"};
38401
+
38388
38402
  /* Dynamic colors via CSS custom properties */
38389
38403
  background-color: ${props => props.$backgroundColor || '#F3F4F6'};
38390
38404
  color: ${props => props.$textColor || '#374151'};
@@ -38422,7 +38436,8 @@ const MultiTagWrapper = styled.div`
38422
38436
  flex-wrap: wrap;
38423
38437
  gap: 4px;
38424
38438
  max-width: 100%;
38425
- align-items: flex-start;
38439
+ align-items: center; /* Center multiple tags vertically */
38440
+ min-height: 32px; /* Ensure minimum height for centering */
38426
38441
  `;
38427
38442
  const TextareaWrapper = styled.div`
38428
38443
  position: relative;
@@ -38914,33 +38929,30 @@ const TableBody = ({
38914
38929
  const maxDisplay = tagConfig.maxDisplay || 3;
38915
38930
  const isMultiple = tagConfig.multiple !== false; // Default to true
38916
38931
 
38917
- // Handle single tag
38918
- if (typeof value === 'string') {
38919
- const colorConfig = colors[value] || defaultColor;
38920
- return /*#__PURE__*/React$1.createElement(TagContainer, null, /*#__PURE__*/React$1.createElement(TagChip, {
38932
+ // Helper function to create a tag chip with proper tooltip
38933
+ const createTagChip = (tagValue, index = 0) => {
38934
+ const colorConfig = colors[tagValue] || defaultColor;
38935
+ const formattedText = formatTagText(tagValue);
38936
+ return /*#__PURE__*/React$1.createElement(TagChip, {
38937
+ key: `${tagValue}-${index}`,
38921
38938
  $backgroundColor: colorConfig.bg,
38922
38939
  $textColor: colorConfig.text,
38923
38940
  $borderColor: colorConfig.border,
38924
38941
  $interactive: false,
38925
- title: value
38926
- }, formatTagText(value)));
38942
+ title: formattedText // Always show full text in tooltip
38943
+ }, /*#__PURE__*/React$1.createElement(TagChipTextWrapper, null, formattedText));
38944
+ };
38945
+
38946
+ // Handle single tag
38947
+ if (typeof value === 'string') {
38948
+ return /*#__PURE__*/React$1.createElement(TagContainer, null, createTagChip(value));
38927
38949
  }
38928
38950
 
38929
38951
  // Handle multiple tags
38930
38952
  if (Array.isArray(value) && isMultiple) {
38931
38953
  const visibleTags = value.slice(0, maxDisplay);
38932
38954
  const remainingCount = value.length - maxDisplay;
38933
- return /*#__PURE__*/React$1.createElement(TagContainer, null, /*#__PURE__*/React$1.createElement(MultiTagWrapper, null, visibleTags.map((tag, index) => {
38934
- const colorConfig = colors[tag] || defaultColor;
38935
- return /*#__PURE__*/React$1.createElement(TagChip, {
38936
- key: `${tag}-${index}`,
38937
- $backgroundColor: colorConfig.bg,
38938
- $textColor: colorConfig.text,
38939
- $borderColor: colorConfig.border,
38940
- $interactive: false,
38941
- title: tag
38942
- }, formatTagText(tag));
38943
- }), remainingCount > 0 && /*#__PURE__*/React$1.createElement(TagOverflow, {
38955
+ return /*#__PURE__*/React$1.createElement(TagContainer, null, /*#__PURE__*/React$1.createElement(MultiTagWrapper, null, visibleTags.map((tag, index) => createTagChip(tag, index)), remainingCount > 0 && /*#__PURE__*/React$1.createElement(TagOverflow, {
38944
38956
  title: `${remainingCount} more: ${value.slice(maxDisplay).map(tag => formatTagText(tag)).join(', ')}`
38945
38957
  }, "+", remainingCount)));
38946
38958
  }
@@ -53337,7 +53349,8 @@ const QuickFilterCards = _ref => {
53337
53349
  let {
53338
53350
  data = [],
53339
53351
  onCardToggle = () => {},
53340
- width = "100%"
53352
+ width = "100%",
53353
+ CardsContainerClassName = "QuickFilterCardsContainer"
53341
53354
  } = _ref;
53342
53355
  // local mirror so UI updates immediately even if parent is slow/not controlling
53343
53356
  const [items, setItems] = useState(data);
@@ -53356,7 +53369,7 @@ const QuickFilterCards = _ref => {
53356
53369
  };
53357
53370
  return /*#__PURE__*/React$1.createElement(CardsContainer, {
53358
53371
  width: width,
53359
- className: "QuickFilterCardsContainer"
53372
+ className: CardsContainerClassName
53360
53373
  }, items.map(_ref2 => {
53361
53374
  let {
53362
53375
  status,