fis-component 0.1.30 → 0.1.32

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/cjs/index.js CHANGED
@@ -69376,7 +69376,7 @@ const normalizeText = (value) => {
69376
69376
  .trim();
69377
69377
  };
69378
69378
 
69379
- const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, selectedValues = [], onChangeSelected, searchValue = "", onSearchChange, loading = false, noData = false, noResult = false, combobox, className, onClickMenu, loadingText = "Data loading...", noDataText = "No data", noResultText = "No result", removeSelectedText = "Remove selected", selectedGroupLabel = "Selected", maxHeight, focusSearchInput = true, onPopupScroll, normalizeTextSearch = false, renderOption, searchDebounce = 300, footer, showSearch, onSearchInput, virtualized = false, virtualItemHeight, }) => {
69379
+ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, selectedValues = [], onChangeSelected, searchValue = "", onSearchChange, loading = false, noData = false, noResult = false, combobox, className, onClickMenu, loadingText = "Đang tải dữ liệu...", noDataText = "Không có dữ liệu", noResultText = "Không tìm thấy kết quả", removeSelectedText = "Bỏ chọn", selectedGroupLabel = "ĐÃ CHỌN", maxHeight, focusSearchInput = true, onPopupScroll, normalizeTextSearch = false, renderOption, searchDebounce = 300, footer, showSearch, onSearchInput, virtualized = false, virtualItemHeight, }) => {
69380
69380
  // Chiều cao hàng = min-height item + gap xs (4px): md 36+4, lg 44+4.
69381
69381
  const intrinsicItemHeight = virtualItemHeight ?? (size === "lg" ? 48 : 40);
69382
69382
  const [localSearch, setLocalSearch] = React.useState(searchValue);
@@ -73002,7 +73002,7 @@ const FISCombobox = React.forwardRef(({ className, options, value, disabled = fa
73002
73002
  const count = selected.length;
73003
73003
  return multiDisplayText
73004
73004
  ? multiDisplayText(count)
73005
- : `Selected ${count.toString().padStart(2, "0")} option${count !== 1 ? "s" : ""}`;
73005
+ : `Đã chọn ${count.toString().padStart(2, "0")} tùy chọn`;
73006
73006
  }
73007
73007
  else {
73008
73008
  const selected = flatItems.find((item) => item.value === value);
@@ -73518,7 +73518,8 @@ const DivHeaderCellContainerSC = styled.div `
73518
73518
  .header-cell-content {
73519
73519
  display: flex;
73520
73520
  flex-direction: column;
73521
- align-items: flex-start;
73521
+ align-items: stretch;
73522
+ width: ${(props) => (props.$onlyIcon ? "auto" : "100%")};
73522
73523
  box-sizing: border-box;
73523
73524
  gap: ${getTheme("com/table/title-cell/vertical-gap")};
73524
73525
  ${(props) => {
@@ -73537,18 +73538,21 @@ const DivHeaderCellContainerSC = styled.div `
73537
73538
 
73538
73539
  .cell-content {
73539
73540
  display: flex;
73541
+ width: ${(props) => (props.$onlyIcon ? "auto" : "100%")};
73540
73542
  justify-content: ${(props) => props.$textAlign === "right" ? "flex-end" : "space-between"};
73541
- // width: 100%;
73542
73543
  gap: ${getTheme("com/table/title-cell/default/label/vertical-gap")};
73543
73544
  .label-container {
73544
73545
  display: flex;
73546
+ flex: 1;
73547
+ min-width: 0;
73545
73548
  gap: 4px;
73546
73549
 
73547
73550
  .label {
73548
73551
  ${getTheme("Label/XS")};
73549
73552
  width: 100%;
73553
+ min-width: 0;
73550
73554
  display: inline-block;
73551
- ${(props) => (props.$textAlign === "right" ? "text-align: end" : "")};
73555
+ text-align: ${(props) => props.$textAlign};
73552
73556
  color: ${(props) => getTheme(`com/table/title-cell/${props?.$disabled ? "disable" : "default"}/label/color-text`)};
73553
73557
 
73554
73558
  ${(props) => {
@@ -73594,6 +73598,8 @@ const DivHeaderCellContainerSC = styled.div `
73594
73598
 
73595
73599
  .description {
73596
73600
  ${getTheme("Paragraph/XS")};
73601
+ width: 100%;
73602
+ text-align: ${(props) => props.$textAlign};
73597
73603
  color: ${(props) => getTheme(`com/table/title-cell/${props?.$disabled ? "disable" : "default"}/description/color-text`)};
73598
73604
 
73599
73605
  & + span {
@@ -75748,7 +75754,7 @@ function isMenuSize(value) {
75748
75754
  return value === "sm" || value === "md";
75749
75755
  }
75750
75756
 
75751
- const FISSelect = React.forwardRef(({ className, style, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholder, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal = true, maxHeight, onPopupScroll, onOpen, hideChip, tooltipTitle, tooltipVariant = "primary", noData, noResult, noDataText, noResultText, footer, searchDebounce, showSearch, onSearchInput, virtualized, virtualItemHeight, removeSelectedText, ...restProps }, ref) => {
75757
+ const FISSelect = React.forwardRef(({ className, style, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholder, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal = true, maxHeight, onPopupScroll, onOpen, hideChip, tooltipTitle, tooltipVariant = "primary", noData, noResult, noDataText, noResultText, footer, searchDebounce, showSearch, onSearchInput, virtualized, virtualItemHeight, removeSelectedText, selectedGroupLabel, ...restProps }, ref) => {
75752
75758
  const [isOpen, setIsOpen] = React.useState(false);
75753
75759
  const [referenceElement, setReferenceElement] = React.useState(null);
75754
75760
  const [popperElement, setPopperElement] = React.useState(null);
@@ -75803,7 +75809,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
75803
75809
  }
75804
75810
  return multiDisplayText
75805
75811
  ? multiDisplayText(count)
75806
- : `Selected ${count.toString().padStart(2, "0")} option${count !== 1 ? "s" : ""}`;
75812
+ : `Đã chọn ${count.toString().padStart(2, "0")} tùy chọn`;
75807
75813
  }
75808
75814
  else {
75809
75815
  if (value) {
@@ -75903,6 +75909,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
75903
75909
  virtualized,
75904
75910
  virtualItemHeight,
75905
75911
  removeSelectedText,
75912
+ selectedGroupLabel,
75906
75913
  ...restProps,
75907
75914
  }), [
75908
75915
  options,
@@ -75929,6 +75936,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
75929
75936
  virtualized,
75930
75937
  virtualItemHeight,
75931
75938
  removeSelectedText,
75939
+ selectedGroupLabel,
75932
75940
  restProps,
75933
75941
  ]);
75934
75942
  React.useEffect(() => {