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 +15 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +15 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -69356,7 +69356,7 @@ const normalizeText = (value) => {
|
|
|
69356
69356
|
.trim();
|
|
69357
69357
|
};
|
|
69358
69358
|
|
|
69359
|
-
const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, selectedValues = [], onChangeSelected, searchValue = "", onSearchChange, loading = false, noData = false, noResult = false, combobox, className, onClickMenu, loadingText = "
|
|
69359
|
+
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, }) => {
|
|
69360
69360
|
// Chiều cao hàng = min-height item + gap xs (4px): md 36+4, lg 44+4.
|
|
69361
69361
|
const intrinsicItemHeight = virtualItemHeight ?? (size === "lg" ? 48 : 40);
|
|
69362
69362
|
const [localSearch, setLocalSearch] = useState(searchValue);
|
|
@@ -72982,7 +72982,7 @@ const FISCombobox = forwardRef(({ className, options, value, disabled = false, t
|
|
|
72982
72982
|
const count = selected.length;
|
|
72983
72983
|
return multiDisplayText
|
|
72984
72984
|
? multiDisplayText(count)
|
|
72985
|
-
:
|
|
72985
|
+
: `Đã chọn ${count.toString().padStart(2, "0")} tùy chọn`;
|
|
72986
72986
|
}
|
|
72987
72987
|
else {
|
|
72988
72988
|
const selected = flatItems.find((item) => item.value === value);
|
|
@@ -73498,7 +73498,8 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
73498
73498
|
.header-cell-content {
|
|
73499
73499
|
display: flex;
|
|
73500
73500
|
flex-direction: column;
|
|
73501
|
-
align-items:
|
|
73501
|
+
align-items: stretch;
|
|
73502
|
+
width: ${(props) => (props.$onlyIcon ? "auto" : "100%")};
|
|
73502
73503
|
box-sizing: border-box;
|
|
73503
73504
|
gap: ${getTheme("com/table/title-cell/vertical-gap")};
|
|
73504
73505
|
${(props) => {
|
|
@@ -73517,18 +73518,21 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
73517
73518
|
|
|
73518
73519
|
.cell-content {
|
|
73519
73520
|
display: flex;
|
|
73521
|
+
width: ${(props) => (props.$onlyIcon ? "auto" : "100%")};
|
|
73520
73522
|
justify-content: ${(props) => props.$textAlign === "right" ? "flex-end" : "space-between"};
|
|
73521
|
-
// width: 100%;
|
|
73522
73523
|
gap: ${getTheme("com/table/title-cell/default/label/vertical-gap")};
|
|
73523
73524
|
.label-container {
|
|
73524
73525
|
display: flex;
|
|
73526
|
+
flex: 1;
|
|
73527
|
+
min-width: 0;
|
|
73525
73528
|
gap: 4px;
|
|
73526
73529
|
|
|
73527
73530
|
.label {
|
|
73528
73531
|
${getTheme("Label/XS")};
|
|
73529
73532
|
width: 100%;
|
|
73533
|
+
min-width: 0;
|
|
73530
73534
|
display: inline-block;
|
|
73531
|
-
${(props) =>
|
|
73535
|
+
text-align: ${(props) => props.$textAlign};
|
|
73532
73536
|
color: ${(props) => getTheme(`com/table/title-cell/${props?.$disabled ? "disable" : "default"}/label/color-text`)};
|
|
73533
73537
|
|
|
73534
73538
|
${(props) => {
|
|
@@ -73574,6 +73578,8 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
73574
73578
|
|
|
73575
73579
|
.description {
|
|
73576
73580
|
${getTheme("Paragraph/XS")};
|
|
73581
|
+
width: 100%;
|
|
73582
|
+
text-align: ${(props) => props.$textAlign};
|
|
73577
73583
|
color: ${(props) => getTheme(`com/table/title-cell/${props?.$disabled ? "disable" : "default"}/description/color-text`)};
|
|
73578
73584
|
|
|
73579
73585
|
& + span {
|
|
@@ -75728,7 +75734,7 @@ function isMenuSize(value) {
|
|
|
75728
75734
|
return value === "sm" || value === "md";
|
|
75729
75735
|
}
|
|
75730
75736
|
|
|
75731
|
-
const FISSelect = 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) => {
|
|
75737
|
+
const FISSelect = 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) => {
|
|
75732
75738
|
const [isOpen, setIsOpen] = useState(false);
|
|
75733
75739
|
const [referenceElement, setReferenceElement] = useState(null);
|
|
75734
75740
|
const [popperElement, setPopperElement] = useState(null);
|
|
@@ -75783,7 +75789,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
75783
75789
|
}
|
|
75784
75790
|
return multiDisplayText
|
|
75785
75791
|
? multiDisplayText(count)
|
|
75786
|
-
:
|
|
75792
|
+
: `Đã chọn ${count.toString().padStart(2, "0")} tùy chọn`;
|
|
75787
75793
|
}
|
|
75788
75794
|
else {
|
|
75789
75795
|
if (value) {
|
|
@@ -75883,6 +75889,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
75883
75889
|
virtualized,
|
|
75884
75890
|
virtualItemHeight,
|
|
75885
75891
|
removeSelectedText,
|
|
75892
|
+
selectedGroupLabel,
|
|
75886
75893
|
...restProps,
|
|
75887
75894
|
}), [
|
|
75888
75895
|
options,
|
|
@@ -75909,6 +75916,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
75909
75916
|
virtualized,
|
|
75910
75917
|
virtualItemHeight,
|
|
75911
75918
|
removeSelectedText,
|
|
75919
|
+
selectedGroupLabel,
|
|
75912
75920
|
restProps,
|
|
75913
75921
|
]);
|
|
75914
75922
|
useEffect(() => {
|