fis-component 0.0.33 → 0.0.35

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.
Files changed (44) hide show
  1. package/dist/cjs/index.js +237 -35
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/src/assets/icons/ChevronLeftIcon.d.ts +3 -0
  4. package/dist/cjs/types/src/assets/icons/ChevronRightIcon.d.ts +3 -0
  5. package/dist/cjs/types/src/assets/icons/InfoIcon.d.ts +1 -2
  6. package/dist/cjs/types/src/assets/icons/index.d.ts +2 -0
  7. package/dist/cjs/types/src/components/Breadcrumb/index.d.ts +1 -1
  8. package/dist/cjs/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +311 -0
  9. package/dist/cjs/types/src/components/Input/InputTime/styles.d.ts +0 -2
  10. package/dist/cjs/types/src/components/MenuSelect/types.d.ts +1 -1
  11. package/dist/cjs/types/src/components/Pagination/Pagination.stories.d.ts +8 -0
  12. package/dist/cjs/types/src/components/Pagination/index.d.ts +9 -0
  13. package/dist/cjs/types/src/components/Pagination/styles.d.ts +25 -0
  14. package/dist/cjs/types/src/components/Select/types.d.ts +3 -3
  15. package/dist/cjs/types/src/components/Select/utils.d.ts +2 -0
  16. package/dist/cjs/types/src/components/SelectItem/index.d.ts +1 -5
  17. package/dist/cjs/types/src/components/Toast/ToastContext.d.ts +2 -1
  18. package/dist/cjs/types/src/components/Toast/index.d.ts +1 -0
  19. package/dist/cjs/types/src/components/Toast/styles.d.ts +3 -1
  20. package/dist/cjs/types/src/components/Toast/useToast.d.ts +2 -1
  21. package/dist/cjs/types/src/index.d.ts +5 -0
  22. package/dist/esm/index.js +233 -36
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/types/src/assets/icons/ChevronLeftIcon.d.ts +3 -0
  25. package/dist/esm/types/src/assets/icons/ChevronRightIcon.d.ts +3 -0
  26. package/dist/esm/types/src/assets/icons/InfoIcon.d.ts +1 -2
  27. package/dist/esm/types/src/assets/icons/index.d.ts +2 -0
  28. package/dist/esm/types/src/components/Breadcrumb/index.d.ts +1 -1
  29. package/dist/esm/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +311 -0
  30. package/dist/esm/types/src/components/Input/InputTime/styles.d.ts +0 -2
  31. package/dist/esm/types/src/components/MenuSelect/types.d.ts +1 -1
  32. package/dist/esm/types/src/components/Pagination/Pagination.stories.d.ts +8 -0
  33. package/dist/esm/types/src/components/Pagination/index.d.ts +9 -0
  34. package/dist/esm/types/src/components/Pagination/styles.d.ts +25 -0
  35. package/dist/esm/types/src/components/Select/types.d.ts +3 -3
  36. package/dist/esm/types/src/components/Select/utils.d.ts +2 -0
  37. package/dist/esm/types/src/components/SelectItem/index.d.ts +1 -5
  38. package/dist/esm/types/src/components/Toast/ToastContext.d.ts +2 -1
  39. package/dist/esm/types/src/components/Toast/index.d.ts +1 -0
  40. package/dist/esm/types/src/components/Toast/styles.d.ts +3 -1
  41. package/dist/esm/types/src/components/Toast/useToast.d.ts +2 -1
  42. package/dist/esm/types/src/index.d.ts +5 -0
  43. package/dist/index.d.ts +75 -27
  44. package/package.json +1 -1
package/dist/esm/index.js CHANGED
@@ -12992,7 +12992,7 @@ function mergeConfig() {
12992
12992
  });
12993
12993
  return clone;
12994
12994
  }
12995
- function useNotification$1() {
12995
+ function useNotification$2() {
12996
12996
  var rootConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12997
12997
  var _rootConfig$getContai = rootConfig.getContainer,
12998
12998
  getContainer = _rootConfig$getContai === void 0 ? defaultGetContainer : _rootConfig$getContai,
@@ -22078,7 +22078,7 @@ const Holder = /*#__PURE__*/React__default.forwardRef((props, ref) => {
22078
22078
  // ============================== Motion ===============================
22079
22079
  const getNotificationMotion = () => getMotion$2(prefixCls);
22080
22080
  // ============================== Origin ===============================
22081
- const [api, holder] = useNotification$1({
22081
+ const [api, holder] = useNotification$2({
22082
22082
  prefixCls,
22083
22083
  style: getStyle,
22084
22084
  className: getClassName,
@@ -22193,7 +22193,7 @@ function useInternalNotification(notificationConfig) {
22193
22193
  ref: holderRef
22194
22194
  }))];
22195
22195
  }
22196
- function useNotification(notificationConfig) {
22196
+ function useNotification$1(notificationConfig) {
22197
22197
  return useInternalNotification(notificationConfig);
22198
22198
  }
22199
22199
 
@@ -50142,7 +50142,7 @@ const baseStaticMethods = {
50142
50142
  open,
50143
50143
  destroy,
50144
50144
  config: setNotificationGlobalConfig,
50145
- useNotification,
50145
+ useNotification: useNotification$1,
50146
50146
  _InternalPanelDoNotUseOrYouWillBeFired: PurePanel$5
50147
50147
  };
50148
50148
  const staticMethods = baseStaticMethods;
@@ -61071,7 +61071,7 @@ const ButtonStyled = styled.button `
61071
61071
  `}
61072
61072
 
61073
61073
  &:disabled {
61074
- background-color: ${getTheme("com/button/disable/background-color-transparent")};
61074
+ background-color: ${getTheme("com/button/disable/background-color")};
61075
61075
  border-color: ${getTheme("com/button/disable/stroke-color")};
61076
61076
  color: ${getTheme("com/button/disable/icon-color")} !important;
61077
61077
  }
@@ -61548,8 +61548,7 @@ function ExitIcon(props) {
61548
61548
  }
61549
61549
 
61550
61550
  function InfoIcon(props) {
61551
- const { width = 16, height = 16, ...rest } = props;
61552
- return (jsx("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.60018 0.666626C4.55009 0.666626 1.26685 3.94987 1.26685 7.99996C1.26685 12.05 4.55009 15.3333 8.60018 15.3333C12.6503 15.3333 15.9335 12.05 15.9335 7.99996C15.9335 3.94987 12.6503 0.666626 8.60018 0.666626ZM8.60018 4.66663C8.23199 4.66663 7.93351 4.9651 7.93351 5.33329C7.93351 5.70148 8.23199 5.99996 8.60018 5.99996H8.60685C8.97504 5.99996 9.27351 5.70148 9.27351 5.33329C9.27351 4.9651 8.97504 4.66663 8.60685 4.66663H8.60018ZM9.26685 7.99996C9.26685 7.63177 8.96837 7.33329 8.60018 7.33329C8.23199 7.33329 7.93351 7.63177 7.93351 7.99996V10.6666C7.93351 11.0348 8.23199 11.3333 8.60018 11.3333C8.96837 11.3333 9.26685 11.0348 9.26685 10.6666V7.99996Z", fill: "#0083F0" }) }));
61551
+ return (jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsx("g", { "clip-path": "url(#clip0_6263_11228)", children: jsx("path", { d: "M7.99967 10.6667V8.00004M7.99967 5.33337H8.00634M14.6663 8.00004C14.6663 11.6819 11.6816 14.6667 7.99967 14.6667C4.31778 14.6667 1.33301 11.6819 1.33301 8.00004C1.33301 4.31814 4.31778 1.33337 7.99967 1.33337C11.6816 1.33337 14.6663 4.31814 14.6663 8.00004Z", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_6263_11228", children: jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }));
61553
61552
  }
61554
61553
 
61555
61554
  function CheckIcon(props) {
@@ -61621,6 +61620,16 @@ function RemoveIcon(props) {
61621
61620
  return (jsx("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M6.6665 9.99999H13.3332M18.3332 9.99999C18.3332 14.6024 14.6022 18.3333 9.99984 18.3333C5.39746 18.3333 1.6665 14.6024 1.6665 9.99999C1.6665 5.39762 5.39746 1.66666 9.99984 1.66666C14.6022 1.66666 18.3332 5.39762 18.3332 9.99999Z", stroke: "#A80A12", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
61622
61621
  }
61623
61622
 
61623
+ function ChevronLeftIcon(props) {
61624
+ const { width = 16, height = 16, ...rest } = props;
61625
+ return (jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
61626
+ }
61627
+
61628
+ function ChevronRightIcon(props) {
61629
+ const { width = 16, height = 16, ...rest } = props;
61630
+ return (jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M6 12L10 8L6 4", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
61631
+ }
61632
+
61624
61633
  const renderSystemNotification = ({ title, description, imgUrl, okText = "ok", cancelText = "Dismiss", moreOption, onMoreClick, onOk, onCancel, onClose, }) => {
61625
61634
  return (jsxs(DivNotificationSystemWrapperSC, { children: [jsx(ImgNotificationSystemSC, { src: imgUrl }), jsxs(DivNotificationSystemContainerSC, { children: [jsxs(DivNotificationContentWrapperSC, { children: [jsxs(DivNotificationContentSC, { children: [jsxs(DivNotificationHeaderSC, { children: [jsx(DivNotificationTitleSC, { children: title }), moreOption && (jsx(DivIconActionSC, { children: jsx(FISIconButton, { variant: "tertiary-invisible", size: "xs", icon: jsx(MoreIcon, {}), onClick: onMoreClick }) }))] }), jsx(DivNotificationDescriptionSC, { children: description })] }), jsxs(DivNotificationActionsSC, { children: [jsx(FISLinkButton, { size: "xs", variant: "hight-priority", onClick: onOk, children: okText }), jsx(FISLinkButton, { size: "xs", onClick: onCancel, children: cancelText })] })] }), jsx(DivIconActionSC, { children: jsx(FISIconButton, { icon: jsx(CloseIcon, {}), size: "xs", variant: "tertiary-invisible", onClick: onClose }) })] })] }));
61626
61635
  };
@@ -61677,7 +61686,7 @@ function GlobalStyle({ theme }) {
61677
61686
  const DivContainerSC$a = styled.div `
61678
61687
  display: flex;
61679
61688
  align-items: flex-start;
61680
- width: fit-content;
61689
+ width: 100%;
61681
61690
  border-radius: ${getTheme("com/toast/corner-radius")};
61682
61691
  outline: ${getTheme("com/toast/theme/border/stroke-width")} solid
61683
61692
  ${getTheme("com/toast/theme/border/color-stroke/neutral")};
@@ -61802,13 +61811,13 @@ const DivTitleWrap = styled.div `
61802
61811
  `;
61803
61812
  const ToastWrapper = styled.div `
61804
61813
  position: fixed;
61805
- bottom: 20px;
61814
+ ${(props) => props.$position === "bottom-center" ? "bottom: 20px;" : "top: 20px;"}
61806
61815
  left: 50%;
61807
61816
  transform: translateX(-50%);
61808
61817
  z-index: 1000;
61809
61818
  display: flex;
61810
61819
  flex-direction: column;
61811
- gap: 10px;
61820
+ gap: 8px;
61812
61821
  `;
61813
61822
 
61814
61823
  const getPadding = (size, borderPath) => {
@@ -62534,7 +62543,7 @@ const ToastProvider = ({ children, }) => {
62534
62543
  setToasts((prev) => prev.slice(1));
62535
62544
  }, duration);
62536
62545
  }, []);
62537
- return (jsxs(ToastContext.Provider, { value: { showToast }, children: [children, toasts.length > 0 && (jsx(ToastWrapper, { children: toasts.map((toast, index) => (jsx(FISToast, { ...toast }, index))) }))] }));
62546
+ return (jsxs(ToastContext.Provider, { value: { showToast }, children: [children, toasts.length > 0 && (jsx(ToastWrapper, { "$position": toasts[0].position || "top-center", children: toasts.map((toast, index) => (jsx(FISToast, { ...toast }, index))) }))] }));
62538
62547
  };
62539
62548
 
62540
62549
  const FISThemeProvider = ({ theme: theme$1 = theme, children, }) => (jsxs(ThemeProvider, { theme: theme$1, children: [jsx(GlobalStyle, { theme: theme$1 }), jsx(NotificationProvider, { children: jsx(ToastProvider, { children: children }) })] }));
@@ -63982,6 +63991,7 @@ const CheckboxContainerStyled = styled.label `
63982
63991
  align-items: center;
63983
63992
  gap: ${getTheme("com/checkbox/horizontal-gap")};
63984
63993
  cursor: pointer;
63994
+ width: fit-content;
63985
63995
 
63986
63996
  &:hover ${CheckboxControlStyled} {
63987
63997
  border-color: ${getTheme("com/checkbox/item/unmarked/color-stroke/hover")};
@@ -65585,7 +65595,7 @@ const DicContainerSC = styled.div `
65585
65595
  display: flex;
65586
65596
  flex-direction: column;
65587
65597
  gap: ${getTheme("sem/dimension/gap/xs")};
65588
- width: fit-content;
65598
+ width: 100%;
65589
65599
  `;
65590
65600
  const DivResizeSC = styled.div `
65591
65601
  position: absolute;
@@ -65624,6 +65634,7 @@ const TextAreaSC = styled.textarea `
65624
65634
  font-family: inherit;
65625
65635
  outline: none;
65626
65636
  border: none;
65637
+ width: 100%;
65627
65638
  ${getTheme("Paragraph/Sm")};
65628
65639
  padding-top: ${getTheme("com/input/field/size-md/label/vertical-padding")};
65629
65640
  padding-right: ${getTheme("com/input/field/size-md/label/horizontal-padding")};
@@ -65925,7 +65936,7 @@ const DivContainerSC$5 = styled.div `
65925
65936
  display: flex;
65926
65937
  align-items: center;
65927
65938
  justify-content: space-between;
65928
- width: fit-content;
65939
+ width: 100%;
65929
65940
  background-color: ${getTheme("com/input/field/default/background/default")};
65930
65941
  height: ${getTheme("com/input/field/size-md/height")};
65931
65942
  height: ${getTheme("com/input/field/size-md/height")};
@@ -66250,7 +66261,6 @@ FISTooltip.displayName = "FISTooltip";
66250
66261
 
66251
66262
  const DivContainerSC$4 = styled.div `
66252
66263
  width: unset;
66253
- height: ${getTheme("com/menu/height")};
66254
66264
  min-width: ${getTheme("com/menu/min-width")};
66255
66265
  max-height: ${getTheme("com/menu/max-height")};
66256
66266
  border-radius: ${getTheme("com/menu/corner-radius")};
@@ -67327,7 +67337,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
67327
67337
  : null;
67328
67338
  const otherGroups = groups
67329
67339
  .map((group) => ({
67330
- groupLabel: group.groupLabel,
67340
+ groupLabel: group?.groupLabel,
67331
67341
  items: group.items.filter((item) => (!multi || !selectedValues?.includes(item.value)) &&
67332
67342
  item?.label?.toLowerCase().includes(search.toLowerCase())),
67333
67343
  }))
@@ -67392,7 +67402,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
67392
67402
  onClickMenu?.();
67393
67403
  }
67394
67404
  };
67395
- return (jsx(DivContainerSC$4, { className: className, children: jsxs(DivWrapperMenuSC, { children: [showInput && !combobox && (jsx(DivSearchSC, { children: jsx(FISInputText, { iconPrefix: jsx(SearchIcon, {}), placeholder: placeholder, onChange: handleSearchChange }) })), (shouldShowNoResult || noResult) && (jsxs(DivLoaderSC, { children: [jsx(DivIconDataSC, { children: jsx(NoResultIcon, {}) }), jsx(PTitleSC$2, { children: noResultText })] })), noData && (jsxs(DivLoaderSC, { children: [jsx(DivIconDataSC, { children: jsx(NoDataIcon, {}) }), jsx(PTitleSC$2, { children: noDataText })] })), loading && (jsxs(DivLoaderSC, { children: [jsx(FISProgressCircular, { size: size, variant: "indeterminate" }), jsx(PTitleSC$2, { children: loadingText })] })), !shouldShowNoResult && (jsxs(Fragment, { children: [jsx(MenuContent, { "$removeSelectedGroup": !!menuState.removeSelectedGroup, children: menuState.filteredGroups.map((group, index) => (jsxs(DivWrapperSC$4, { children: [index !== 0 && jsx(FISMenuSection, { withDivider: true }), jsx(FISMenuSection, { label: group.groupLabel }), group.items.map((item, idx) => (jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => handleItemClick(item), selected: selectedValues?.includes(item.value), type: "select" }, idx)))] }, index))) }), menuState.removeSelectedGroup && (jsx(FixedBottomSection, { children: jsx(DivWrapperSC$4, { children: menuState.removeSelectedGroup.items.map((item, idx) => (jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => onChangeSelected?.([]), type: "select", iconPrefix: jsx(RemoveIcon, {}), negative: true }, idx))) }) }))] }))] }) }));
67405
+ return (jsx(DivContainerSC$4, { className: className, children: jsxs(DivWrapperMenuSC, { children: [showInput && !combobox && (jsx(DivSearchSC, { children: jsx(FISInputText, { iconPrefix: jsx(SearchIcon, {}), placeholder: placeholder, onChange: handleSearchChange }) })), (shouldShowNoResult || noResult) && (jsxs(DivLoaderSC, { children: [jsx(DivIconDataSC, { children: jsx(NoResultIcon, {}) }), jsx(PTitleSC$2, { children: noResultText })] })), noData && (jsxs(DivLoaderSC, { children: [jsx(DivIconDataSC, { children: jsx(NoDataIcon, {}) }), jsx(PTitleSC$2, { children: noDataText })] })), loading && (jsxs(DivLoaderSC, { children: [jsx(FISProgressCircular, { size: size, variant: "indeterminate" }), jsx(PTitleSC$2, { children: loadingText })] })), !shouldShowNoResult && (jsxs(Fragment, { children: [jsx(MenuContent, { "$removeSelectedGroup": !!menuState.removeSelectedGroup, children: menuState.filteredGroups.map((group, index) => (jsxs(DivWrapperSC$4, { children: [index !== 0 && jsx(FISMenuSection, { withDivider: true }), jsx(FISMenuSection, { label: group?.groupLabel }), group.items.map((item, idx) => (jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => handleItemClick(item), selected: selectedValues?.includes(item.value), type: "select" }, idx)))] }, index))) }), menuState.removeSelectedGroup && (jsx(FixedBottomSection, { children: jsx(DivWrapperSC$4, { children: menuState.removeSelectedGroup.items.map((item, idx) => (jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => onChangeSelected?.([]), type: "select", iconPrefix: jsx(RemoveIcon, {}), negative: true }, idx))) }) }))] }))] }) }));
67396
67406
  };
67397
67407
  FISMenuSelect.displayName = "FISMenuSelect";
67398
67408
 
@@ -70812,7 +70822,7 @@ const DivContainerSC$2 = styled.div `
70812
70822
  display: flex;
70813
70823
  flex-direction: column;
70814
70824
  gap: ${getTheme("com/input/vertical-gap")};
70815
- width: fit-content;
70825
+ width: 100%;
70816
70826
  `;
70817
70827
  const DivHintWrapperSC = styled.div `
70818
70828
  display: flex;
@@ -70835,17 +70845,6 @@ const SpanHintSC = styled.span `
70835
70845
  color: ${getTheme("com/input/hint/disable/label/color-text")};
70836
70846
  }
70837
70847
  `;
70838
- styled.div `
70839
- display: flex;
70840
- flex-direction: column;
70841
- width: fit-content;
70842
- gap: ${getTheme("com/input/vertical-gap")};
70843
- `;
70844
- styled.div `
70845
- position: relative;
70846
- display: inline-block;
70847
- width: 100%;
70848
- `;
70849
70848
  const HiddenTimePickerSC = styled(TimePicker) `
70850
70849
  position: absolute;
70851
70850
  top: 0;
@@ -71198,7 +71197,6 @@ const DivHeaderCellContainerSC = styled.div `
71198
71197
 
71199
71198
  .cell-content {
71200
71199
  display: flex;
71201
- align-items: center;
71202
71200
  justify-content: ${(props) => props.$align === "right" ? "flex-end" : "space-between"};
71203
71201
  min-height: ${getTheme("com/segmented/item/active-surface/size-sm/height")};
71204
71202
  width: 100%;
@@ -71227,6 +71225,17 @@ const DivHeaderCellContainerSC = styled.div `
71227
71225
  }};
71228
71226
  }
71229
71227
 
71228
+ .right-component-father {
71229
+ display: flex;
71230
+ justify-content: center;
71231
+ width: ${getTheme("com/button/size-xs/icon/size-icon")};
71232
+ height: ${getTheme("com/button/size-xs/icon/size-icon")};
71233
+ .right-component-child {
71234
+ flex-shrink: 0;
71235
+ align-self: center;
71236
+ }
71237
+ }
71238
+
71230
71239
  ${(props) => {
71231
71240
  if (props.$disabled) {
71232
71241
  return css `
@@ -71251,7 +71260,7 @@ const DivHeaderCellContainerSC = styled.div `
71251
71260
  `;
71252
71261
 
71253
71262
  const FISHeaderCell = forwardRef(({ className, textAlign, label, description, rightComponent, disabled, hasRightDivider = true, hasTruncateLabel = false, onlyIcon = false, align = "left", ...rest }, ref) => {
71254
- return (jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$align": align, "$onlyIcon": onlyIcon, ...rest, children: jsxs("div", { className: "header-cell-content", children: [jsxs("div", { className: "cell-content", children: [label && jsx("div", { className: "label", children: label }), rightComponent] }), align === "right" ? (jsxs("div", { className: "cell-content", children: [description && jsx("div", { className: "description", children: description }), jsx("span", { children: rightComponent })] })) : (jsx(Fragment, { children: description && jsx("div", { className: "description", children: description }) }))] }) }));
71263
+ return (jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$align": align, "$onlyIcon": onlyIcon, ...rest, children: jsxs("div", { className: "header-cell-content", children: [jsxs("div", { className: "cell-content", children: [label && jsx("div", { className: "label", children: label }), jsx("div", { className: "right-component-father", children: jsx("div", { className: "right-component-child", children: rightComponent }) })] }), jsx("div", { className: "cell-content", children: description && jsx("div", { className: "description", children: description }) })] }) }));
71255
71264
  });
71256
71265
  FISHeaderCell.displayName = "FISHeaderCell";
71257
71266
 
@@ -71599,7 +71608,6 @@ const DivDateRangeContainerSC = styled.div `
71599
71608
  align-items: flex-start;
71600
71609
  gap: ${getTheme("com/input/vertical-gap")};
71601
71610
  width: 100%;
71602
- padding: ${getTheme("sem/dimension/padding/xl")};
71603
71611
  .ant-picker-range {
71604
71612
  width: 100%;
71605
71613
  border: none;
@@ -73216,15 +73224,19 @@ const DivContainerSC = styled.div `
73216
73224
  }
73217
73225
  `;
73218
73226
 
73219
- const FISSelectItem = forwardRef(({ onClickSuffix, onClickPrefix, ...props }, ref) => {
73227
+ const FISSelectItem = forwardRef((props, ref) => {
73220
73228
  const { size = "md", iconPrefix, iconSuffix, disabled, activeDropdown, ...rest } = props;
73221
73229
  return (jsx(DivContainerSC, { className: classNames({
73222
73230
  iconPrefix: iconPrefix,
73223
- }), "$size": size, children: jsxs(DivWrapperSC, { children: [iconPrefix && (jsx(DivIconPrefixSC, { "$size": size, children: iconPrefix })), jsx(InputSC, { ...rest, ref: ref, disabled: disabled, "$size": size }), iconSuffix && (jsx(DivIconSuffixSC, { "$size": size, onClick: onClickSuffix, children: iconSuffix }))] }) }));
73231
+ }), "$size": size, children: jsxs(DivWrapperSC, { children: [iconPrefix && (jsx(DivIconPrefixSC, { "$size": size, children: iconPrefix })), jsx(InputSC, { ...rest, ref: ref, disabled: disabled, "$size": size }), iconSuffix && (jsx(DivIconSuffixSC, { "$size": size, children: iconSuffix }))] }) }));
73224
73232
  });
73225
73233
  FISSelectItem.displayName = "FISSelectItem";
73226
73234
 
73227
- const FISSelect = forwardRef(({ className, options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, ...restProps }, ref) => {
73235
+ function isMenuSize(value) {
73236
+ return value === "sm" || value === "md";
73237
+ }
73238
+
73239
+ const FISSelect = forwardRef(({ className, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, ...restProps }, ref) => {
73228
73240
  const [isOpen, setIsOpen] = useState(false);
73229
73241
  const [referenceElement, setReferenceElement] = useState(null);
73230
73242
  const [popperElement, setPopperElement] = useState(null);
@@ -73285,7 +73297,7 @@ const FISSelect = forwardRef(({ className, options, value, disabled = false, tex
73285
73297
  onChange(newValues);
73286
73298
  }
73287
73299
  }, [multi, onChange, value]);
73288
- return (jsxs(DivWrapperSC$1, { className: className, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsx(FISSelectItem, { ...restProps, ref: ref, size: "md", readOnly: true, iconSuffix: isOpen ? jsx(ArrowUpIcon, {}) : jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen, onClickSuffix: handleToggle }) }), message && (jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsx(SelectedTagsWrapper, { children: jsx(MultipleValue, { options: selectedOptions, onRemove: handleOptionRemove }) })), isOpen && (jsx(Portal, { children: jsx(DivDropdownMenuSC, { ref: setPopperElement, style: { ...styles.popper, width: referenceElement?.offsetWidth }, ...attributes.popper, children: jsx(FISMenuSelect, { groups: options, placeholder: placeholderSearch, loading: loading, multi: multi, selectedValues: multi ? value : value ? [value] : [], onChangeSelected: (values) => {
73300
+ return (jsxs(DivWrapperSC$1, { className: className, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsx(FISSelectItem, { ...restProps, ref: ref, size: size, iconSuffix: isOpen ? jsx(ArrowUpIcon, {}) : jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen }) }), message && (jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsx(SelectedTagsWrapper, { children: jsx(MultipleValue, { options: selectedOptions, onRemove: handleOptionRemove }) })), isOpen && (jsx(Portal, { children: jsx(DivDropdownMenuSC, { ref: setPopperElement, style: { ...styles.popper, width: referenceElement?.offsetWidth }, ...attributes.popper, children: jsx(FISMenuSelect, { size: isMenuSize(size) ? size : "md", groups: options, placeholder: placeholderSearch, loading: loading, multi: multi, selectedValues: multi ? value : value ? [value] : [], onChangeSelected: (values) => {
73289
73301
  if (multi) {
73290
73302
  onChange(values);
73291
73303
  }
@@ -73301,5 +73313,190 @@ const FISSelect = forwardRef(({ className, options, value, disabled = false, tex
73301
73313
  });
73302
73314
  FISSelect.displayName = "FISSelect";
73303
73315
 
73304
- export { FISAlertBanner, FISAvatar, FISBadge, FISBreadcrumb, FISButton, FISButtonGroup, FISCheckbox, FISCheckboxGroup, FISChipButton, FISCollapse, FISCombobox, FISDateRange, FISDivider, FISIconButton, FISInputArea, FISInputDate, FISInputField, FISInputLabel, FISInputStepper, FISInputText, FISInputTime, FISLinkButton, FISMenuItem, FISMenuSection, FISMenuSelect, FISProgressCircular, FISProgressLinear, FISRadio, RadioGroup as FISRadioGroup, FISSegmented, FISSelect, FISSelectItem, FISSorter, FISSplitButton, FISSwitch, FISTab, FISTable, FISColumnCell as FISTableColumn, FISHeaderCell as FISTableHeader, FISThemeProvider, FISToast, FISTooltip, SegmentedPanelItem, TabPanelItem };
73316
+ const useNotification = () => {
73317
+ const context = React__default.useContext(NotificationContext);
73318
+ if (!context) {
73319
+ throw new Error("useNotification must be used within a NotificationProvider");
73320
+ }
73321
+ return context;
73322
+ };
73323
+
73324
+ const useToast = () => {
73325
+ const context = useContext$1(ToastContext);
73326
+ if (!context) {
73327
+ throw new Error("useToast must be used within a ToastProvider");
73328
+ }
73329
+ return context;
73330
+ };
73331
+
73332
+ const PaginationAntdSC = styled(Pagination) `
73333
+ display: flex;
73334
+ align-items: center;
73335
+ gap: ${getTheme("com/pagination/record-number/horizontal-gap")};
73336
+
73337
+ .ant-pagination-item {
73338
+ ${getTheme("Paragraph/Sm")}
73339
+ height: ${getTheme("sem/dimension/size/component/2xs")};
73340
+ min-width: ${getTheme("com/pagination/navigation/page-number/min-with")};
73341
+ border-radius: ${getTheme("com/pagination/navigation/page-number/corner-radius")};
73342
+ display: flex;
73343
+ justify-content: center;
73344
+ align-items: center;
73345
+
73346
+ a {
73347
+ color: ${getTheme("sem/color/text/neutral/sub")} !important;
73348
+ }
73349
+
73350
+ &:hover {
73351
+ background-color: ${getTheme("com/pagination/navigation/page-number/background/background-color/hover")} !important;
73352
+
73353
+ a {
73354
+ color: ${getTheme("com/pagination/navigation/page-number/label/color-text/hover")} !important;
73355
+ }
73356
+ }
73357
+
73358
+ &:active {
73359
+ background-color: ${getTheme("com/pagination/navigation/page-number/background/background-color/pressed")} !important;
73360
+
73361
+ a {
73362
+ color: ${getTheme("com/pagination/navigation/page-number/label/color-text/pressed")} !important;
73363
+ }
73364
+ }
73365
+ }
73366
+
73367
+ .ant-pagination-item:focus-visible,
73368
+ .ant-pagination-next:focus-visible,
73369
+ .ant-pagination-prev:focus-visible {
73370
+ box-shadow:
73371
+ 0px 0px 0px ${getTheme("sem/dimension/stroke-width/divider/lg")}
73372
+ ${getTheme("com/focus-mark/color-gap-spacing")},
73373
+ 0px 0px 0px 4px ${getTheme("com/focus-mark/color-stroke")} !important;
73374
+ outline: none !important;
73375
+ background: ${getTheme("com/pagination/navigation/page-number/background/background-color/active")};
73376
+ }
73377
+
73378
+ .ant-pagination-item-active {
73379
+ border: none !important;
73380
+ background-color: ${getTheme("com/pagination/navigation/page-number/background/background-color/active")};
73381
+
73382
+ a {
73383
+ color: ${getTheme("com/pagination/navigation/page-number/label/color-text/active")} !important;
73384
+ }
73385
+ }
73386
+
73387
+ &.ant-pagination-disabled {
73388
+ .ant-pagination-item {
73389
+ background-color: transparent !important;
73390
+ color: ${getTheme("com/pagination/navigation/page-number/disable/label/color-text/default")} !important;
73391
+ }
73392
+ }
73393
+
73394
+ .ant-pagination-next.ant-pagination-disabled,
73395
+ .ant-pagination-prev.ant-pagination-disabled,
73396
+ &.ant-pagination-disabled .ant-pagination-next,
73397
+ &.ant-pagination-disabled .ant-pagination-prev {
73398
+ color: ${getTheme("com/button/disable/icon-color")} !important;
73399
+ border-color: ${getTheme("com/button/disable/stroke-color")} !important;
73400
+ background-color: transparent !important;
73401
+ }
73402
+
73403
+ &.ant-pagination-disabled .ant-pagination-item-active {
73404
+ background-color: ${getTheme("com/pagination/navigation/page-number/disable/background/background-color/active")} !important;
73405
+ color: ${getTheme("com/pagination/navigation/page-number/disable/label/color-text/active")} !important;
73406
+ }
73407
+
73408
+ .ant-pagination-options {
73409
+ margin-inline-start: ${getTheme("com/pagination/horizontal-gap")} !important;
73410
+ }
73411
+
73412
+ ${({ $minimize }) => $minimize &&
73413
+ css `
73414
+ gap: 0;
73415
+ .ant-pagination-item,
73416
+ .ant-pagination-jump-next,
73417
+ .ant-pagination-jump-prev {
73418
+ display: none;
73419
+ }
73420
+
73421
+ .ant-pagination-next {
73422
+ border-top-left-radius: 0px;
73423
+ border-bottom-left-radius: 0px;
73424
+ }
73425
+
73426
+ .ant-pagination-prev {
73427
+ border-top-right-radius: 0px;
73428
+ border-bottom-right-radius: 0px;
73429
+ border-right: none;
73430
+ }
73431
+ `}
73432
+ `;
73433
+ const DivPaginationContainer = styled.div `
73434
+ display: flex;
73435
+ align-items: center;
73436
+ justify-content: space-between;
73437
+ `;
73438
+ const DivPaginationContent = styled.div `
73439
+ display: flex;
73440
+ align-items: center;
73441
+ gap: ${getTheme("com/pagination/horizontal-gap")};
73442
+ `;
73443
+ const SpanTotalSC = styled.span `
73444
+ display: inline-flex;
73445
+ align-items: center;
73446
+ gap: ${getTheme("sem/dimension/gap/xs")};
73447
+
73448
+ ${getTheme("Paragraph/Sm")};
73449
+ color: ${getTheme("com/pagination/range-number/label/color-text")} !important;
73450
+ `;
73451
+ const SelectPageSizeSC = styled(FISSelect) `
73452
+ // fixed
73453
+ width: 100px;
73454
+ `;
73455
+
73456
+ const LIMIT_DEFAULT = 10;
73457
+ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minimize, recordCounted, onIconPageRecordClick, showTotal, ...rest }) => {
73458
+ const rangeRecords = useMemo$1(() => {
73459
+ return [(current - 1) * pageSize + 1, current * pageSize];
73460
+ }, [current, pageSize, total]);
73461
+ const defaultShowTotal = (jsxs(Fragment, { children: ["Hi\u1EC3n th\u1ECB ", rangeRecords[0], "-", rangeRecords[1], recordCounted ? (`trong ${total} bản ghi`) : (jsx(FISIconButton, { size: "xs", icon: jsx(InfoIcon, {}), variant: "tertiary-invisible", onClick: onIconPageRecordClick }))] }));
73462
+ // Merge the default props with the provided props
73463
+ const mergedProps = {
73464
+ size: "small",
73465
+ showSizeChanger: false,
73466
+ showQuickJumper: false,
73467
+ responsive: true,
73468
+ showLessItems: true,
73469
+ locale: {
73470
+ items_per_page: "/ trang",
73471
+ },
73472
+ total,
73473
+ current,
73474
+ pageSize,
73475
+ ...rest,
73476
+ };
73477
+ const itemRender = (_page, type, originalElement) => {
73478
+ if (type === "prev") {
73479
+ return (jsx(FISIconButton, { size: "xs", icon: jsx(ChevronLeftIcon, {}), variant: "tertiary", disabled: current === 1 }));
73480
+ }
73481
+ if (type === "next") {
73482
+ return (jsx(FISIconButton, { size: "xs", icon: jsx(ChevronRightIcon, {}), variant: "tertiary", disabled: current * pageSize >= total }));
73483
+ }
73484
+ return originalElement;
73485
+ };
73486
+ return (jsxs(DivPaginationContainer, { children: [jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxs(DivPaginationContent, { children: [jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsx(SelectPageSizeSC, { size: "xs", options: [
73487
+ {
73488
+ groupLabel: "",
73489
+ items: (rest.pageSizeOptions || [10, 20, 50, 100]).map((size) => ({
73490
+ label: `${size} ${rest.locale?.items_per_page || mergedProps.locale?.items_per_page}`,
73491
+ value: String(size),
73492
+ })),
73493
+ },
73494
+ ], value: String(pageSize), multi: false, onChange: (value) => {
73495
+ if (rest.onShowSizeChange) {
73496
+ rest.onShowSizeChange(Number(value), pageSize);
73497
+ }
73498
+ } })] })] }));
73499
+ };
73500
+
73501
+ export { FISAlertBanner, FISAvatar, FISBadge, FISBreadcrumb, FISButton, FISButtonGroup, FISCheckbox, FISCheckboxGroup, FISChipButton, FISCollapse, FISColumnCell, FISCombobox, FISDateRange, FISDivider, FISHeaderCell, FISIconButton, FISInputArea, FISInputDate, FISInputField, FISInputLabel, FISInputStepper, FISInputText, FISInputTime, FISLinkButton, FISMenuItem, FISMenuSection, FISMenuSelect, FISProgressCircular, FISProgressLinear, FISRadio, RadioGroup as FISRadioGroup, FISSegmented, FISSelect, FISSelectItem, FISSorter, FISSplitButton, FISSwitch, FISTab, FISTable, FISColumnCell as FISTableColumn, FISHeaderCell as FISTableHeader, FISThemeProvider, FISToast, FISTooltip, FISPagination as Pagination, SegmentedPanelItem, TabPanelItem, useNotification, useToast };
73305
73502
  //# sourceMappingURL=index.js.map