fis-component 0.0.34 → 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 (40) hide show
  1. package/dist/cjs/index.js +231 -20
  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/MenuSelect/types.d.ts +1 -1
  9. package/dist/cjs/types/src/components/Pagination/Pagination.stories.d.ts +8 -0
  10. package/dist/cjs/types/src/components/Pagination/index.d.ts +9 -0
  11. package/dist/cjs/types/src/components/Pagination/styles.d.ts +25 -0
  12. package/dist/cjs/types/src/components/Select/types.d.ts +3 -3
  13. package/dist/cjs/types/src/components/Select/utils.d.ts +2 -0
  14. package/dist/cjs/types/src/components/SelectItem/index.d.ts +1 -5
  15. package/dist/cjs/types/src/components/Toast/ToastContext.d.ts +2 -1
  16. package/dist/cjs/types/src/components/Toast/index.d.ts +1 -0
  17. package/dist/cjs/types/src/components/Toast/styles.d.ts +3 -1
  18. package/dist/cjs/types/src/components/Toast/useToast.d.ts +2 -1
  19. package/dist/cjs/types/src/index.d.ts +5 -0
  20. package/dist/esm/index.js +227 -21
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/types/src/assets/icons/ChevronLeftIcon.d.ts +3 -0
  23. package/dist/esm/types/src/assets/icons/ChevronRightIcon.d.ts +3 -0
  24. package/dist/esm/types/src/assets/icons/InfoIcon.d.ts +1 -2
  25. package/dist/esm/types/src/assets/icons/index.d.ts +2 -0
  26. package/dist/esm/types/src/components/Breadcrumb/index.d.ts +1 -1
  27. package/dist/esm/types/src/components/MenuSelect/types.d.ts +1 -1
  28. package/dist/esm/types/src/components/Pagination/Pagination.stories.d.ts +8 -0
  29. package/dist/esm/types/src/components/Pagination/index.d.ts +9 -0
  30. package/dist/esm/types/src/components/Pagination/styles.d.ts +25 -0
  31. package/dist/esm/types/src/components/Select/types.d.ts +3 -3
  32. package/dist/esm/types/src/components/Select/utils.d.ts +2 -0
  33. package/dist/esm/types/src/components/SelectItem/index.d.ts +1 -5
  34. package/dist/esm/types/src/components/Toast/ToastContext.d.ts +2 -1
  35. package/dist/esm/types/src/components/Toast/index.d.ts +1 -0
  36. package/dist/esm/types/src/components/Toast/styles.d.ts +3 -1
  37. package/dist/esm/types/src/components/Toast/useToast.d.ts +2 -1
  38. package/dist/esm/types/src/index.d.ts +5 -0
  39. package/dist/index.d.ts +75 -27
  40. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -13012,7 +13012,7 @@ function mergeConfig() {
13012
13012
  });
13013
13013
  return clone;
13014
13014
  }
13015
- function useNotification$1() {
13015
+ function useNotification$2() {
13016
13016
  var rootConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
13017
13017
  var _rootConfig$getContai = rootConfig.getContainer,
13018
13018
  getContainer = _rootConfig$getContai === void 0 ? defaultGetContainer : _rootConfig$getContai,
@@ -22098,7 +22098,7 @@ const Holder = /*#__PURE__*/React.forwardRef((props, ref) => {
22098
22098
  // ============================== Motion ===============================
22099
22099
  const getNotificationMotion = () => getMotion$2(prefixCls);
22100
22100
  // ============================== Origin ===============================
22101
- const [api, holder] = useNotification$1({
22101
+ const [api, holder] = useNotification$2({
22102
22102
  prefixCls,
22103
22103
  style: getStyle,
22104
22104
  className: getClassName,
@@ -22213,7 +22213,7 @@ function useInternalNotification(notificationConfig) {
22213
22213
  ref: holderRef
22214
22214
  }))];
22215
22215
  }
22216
- function useNotification(notificationConfig) {
22216
+ function useNotification$1(notificationConfig) {
22217
22217
  return useInternalNotification(notificationConfig);
22218
22218
  }
22219
22219
 
@@ -50162,7 +50162,7 @@ const baseStaticMethods = {
50162
50162
  open,
50163
50163
  destroy,
50164
50164
  config: setNotificationGlobalConfig,
50165
- useNotification,
50165
+ useNotification: useNotification$1,
50166
50166
  _InternalPanelDoNotUseOrYouWillBeFired: PurePanel$5
50167
50167
  };
50168
50168
  const staticMethods = baseStaticMethods;
@@ -61091,7 +61091,7 @@ const ButtonStyled = styled.button `
61091
61091
  `}
61092
61092
 
61093
61093
  &:disabled {
61094
- background-color: ${getTheme("com/button/disable/background-color-transparent")};
61094
+ background-color: ${getTheme("com/button/disable/background-color")};
61095
61095
  border-color: ${getTheme("com/button/disable/stroke-color")};
61096
61096
  color: ${getTheme("com/button/disable/icon-color")} !important;
61097
61097
  }
@@ -61568,8 +61568,7 @@ function ExitIcon(props) {
61568
61568
  }
61569
61569
 
61570
61570
  function InfoIcon(props) {
61571
- const { width = 16, height = 16, ...rest } = props;
61572
- return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.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" }) }));
61571
+ return (jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_6263_11228)", children: jsxRuntime.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" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_6263_11228", children: jsxRuntime.jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }));
61573
61572
  }
61574
61573
 
61575
61574
  function CheckIcon(props) {
@@ -61641,6 +61640,16 @@ function RemoveIcon(props) {
61641
61640
  return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.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" }) }));
61642
61641
  }
61643
61642
 
61643
+ function ChevronLeftIcon(props) {
61644
+ const { width = 16, height = 16, ...rest } = props;
61645
+ return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
61646
+ }
61647
+
61648
+ function ChevronRightIcon(props) {
61649
+ const { width = 16, height = 16, ...rest } = props;
61650
+ return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M6 12L10 8L6 4", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
61651
+ }
61652
+
61644
61653
  const renderSystemNotification = ({ title, description, imgUrl, okText = "ok", cancelText = "Dismiss", moreOption, onMoreClick, onOk, onCancel, onClose, }) => {
61645
61654
  return (jsxRuntime.jsxs(DivNotificationSystemWrapperSC, { children: [jsxRuntime.jsx(ImgNotificationSystemSC, { src: imgUrl }), jsxRuntime.jsxs(DivNotificationSystemContainerSC, { children: [jsxRuntime.jsxs(DivNotificationContentWrapperSC, { children: [jsxRuntime.jsxs(DivNotificationContentSC, { children: [jsxRuntime.jsxs(DivNotificationHeaderSC, { children: [jsxRuntime.jsx(DivNotificationTitleSC, { children: title }), moreOption && (jsxRuntime.jsx(DivIconActionSC, { children: jsxRuntime.jsx(FISIconButton, { variant: "tertiary-invisible", size: "xs", icon: jsxRuntime.jsx(MoreIcon, {}), onClick: onMoreClick }) }))] }), jsxRuntime.jsx(DivNotificationDescriptionSC, { children: description })] }), jsxRuntime.jsxs(DivNotificationActionsSC, { children: [jsxRuntime.jsx(FISLinkButton, { size: "xs", variant: "hight-priority", onClick: onOk, children: okText }), jsxRuntime.jsx(FISLinkButton, { size: "xs", onClick: onCancel, children: cancelText })] })] }), jsxRuntime.jsx(DivIconActionSC, { children: jsxRuntime.jsx(FISIconButton, { icon: jsxRuntime.jsx(CloseIcon, {}), size: "xs", variant: "tertiary-invisible", onClick: onClose }) })] })] }));
61646
61655
  };
@@ -61822,13 +61831,13 @@ const DivTitleWrap = styled.div `
61822
61831
  `;
61823
61832
  const ToastWrapper = styled.div `
61824
61833
  position: fixed;
61825
- bottom: 20px;
61834
+ ${(props) => props.$position === "bottom-center" ? "bottom: 20px;" : "top: 20px;"}
61826
61835
  left: 50%;
61827
61836
  transform: translateX(-50%);
61828
61837
  z-index: 1000;
61829
61838
  display: flex;
61830
61839
  flex-direction: column;
61831
- gap: 10px;
61840
+ gap: 8px;
61832
61841
  `;
61833
61842
 
61834
61843
  const getPadding = (size, borderPath) => {
@@ -62554,7 +62563,7 @@ const ToastProvider = ({ children, }) => {
62554
62563
  setToasts((prev) => prev.slice(1));
62555
62564
  }, duration);
62556
62565
  }, []);
62557
- return (jsxRuntime.jsxs(ToastContext.Provider, { value: { showToast }, children: [children, toasts.length > 0 && (jsxRuntime.jsx(ToastWrapper, { children: toasts.map((toast, index) => (jsxRuntime.jsx(FISToast, { ...toast }, index))) }))] }));
62566
+ return (jsxRuntime.jsxs(ToastContext.Provider, { value: { showToast }, children: [children, toasts.length > 0 && (jsxRuntime.jsx(ToastWrapper, { "$position": toasts[0].position || "top-center", children: toasts.map((toast, index) => (jsxRuntime.jsx(FISToast, { ...toast }, index))) }))] }));
62558
62567
  };
62559
62568
 
62560
62569
  const FISThemeProvider = ({ theme: theme$1 = theme, children, }) => (jsxRuntime.jsxs(styled.ThemeProvider, { theme: theme$1, children: [jsxRuntime.jsx(GlobalStyle, { theme: theme$1 }), jsxRuntime.jsx(NotificationProvider, { children: jsxRuntime.jsx(ToastProvider, { children: children }) })] }));
@@ -66272,7 +66281,6 @@ FISTooltip.displayName = "FISTooltip";
66272
66281
 
66273
66282
  const DivContainerSC$4 = styled.div `
66274
66283
  width: unset;
66275
- height: ${getTheme("com/menu/height")};
66276
66284
  min-width: ${getTheme("com/menu/min-width")};
66277
66285
  max-height: ${getTheme("com/menu/max-height")};
66278
66286
  border-radius: ${getTheme("com/menu/corner-radius")};
@@ -67349,7 +67357,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
67349
67357
  : null;
67350
67358
  const otherGroups = groups
67351
67359
  .map((group) => ({
67352
- groupLabel: group.groupLabel,
67360
+ groupLabel: group?.groupLabel,
67353
67361
  items: group.items.filter((item) => (!multi || !selectedValues?.includes(item.value)) &&
67354
67362
  item?.label?.toLowerCase().includes(search.toLowerCase())),
67355
67363
  }))
@@ -67414,7 +67422,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
67414
67422
  onClickMenu?.();
67415
67423
  }
67416
67424
  };
67417
- return (jsxRuntime.jsx(DivContainerSC$4, { className: className, children: jsxRuntime.jsxs(DivWrapperMenuSC, { children: [showInput && !combobox && (jsxRuntime.jsx(DivSearchSC, { children: jsxRuntime.jsx(FISInputText, { iconPrefix: jsxRuntime.jsx(SearchIcon, {}), placeholder: placeholder, onChange: handleSearchChange }) })), (shouldShowNoResult || noResult) && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(DivIconDataSC, { children: jsxRuntime.jsx(NoResultIcon, {}) }), jsxRuntime.jsx(PTitleSC$2, { children: noResultText })] })), noData && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(DivIconDataSC, { children: jsxRuntime.jsx(NoDataIcon, {}) }), jsxRuntime.jsx(PTitleSC$2, { children: noDataText })] })), loading && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(FISProgressCircular, { size: size, variant: "indeterminate" }), jsxRuntime.jsx(PTitleSC$2, { children: loadingText })] })), !shouldShowNoResult && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuContent, { "$removeSelectedGroup": !!menuState.removeSelectedGroup, children: menuState.filteredGroups.map((group, index) => (jsxRuntime.jsxs(DivWrapperSC$4, { children: [index !== 0 && jsxRuntime.jsx(FISMenuSection, { withDivider: true }), jsxRuntime.jsx(FISMenuSection, { label: group.groupLabel }), group.items.map((item, idx) => (jsxRuntime.jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => handleItemClick(item), selected: selectedValues?.includes(item.value), type: "select" }, idx)))] }, index))) }), menuState.removeSelectedGroup && (jsxRuntime.jsx(FixedBottomSection, { children: jsxRuntime.jsx(DivWrapperSC$4, { children: menuState.removeSelectedGroup.items.map((item, idx) => (jsxRuntime.jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => onChangeSelected?.([]), type: "select", iconPrefix: jsxRuntime.jsx(RemoveIcon, {}), negative: true }, idx))) }) }))] }))] }) }));
67425
+ return (jsxRuntime.jsx(DivContainerSC$4, { className: className, children: jsxRuntime.jsxs(DivWrapperMenuSC, { children: [showInput && !combobox && (jsxRuntime.jsx(DivSearchSC, { children: jsxRuntime.jsx(FISInputText, { iconPrefix: jsxRuntime.jsx(SearchIcon, {}), placeholder: placeholder, onChange: handleSearchChange }) })), (shouldShowNoResult || noResult) && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(DivIconDataSC, { children: jsxRuntime.jsx(NoResultIcon, {}) }), jsxRuntime.jsx(PTitleSC$2, { children: noResultText })] })), noData && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(DivIconDataSC, { children: jsxRuntime.jsx(NoDataIcon, {}) }), jsxRuntime.jsx(PTitleSC$2, { children: noDataText })] })), loading && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(FISProgressCircular, { size: size, variant: "indeterminate" }), jsxRuntime.jsx(PTitleSC$2, { children: loadingText })] })), !shouldShowNoResult && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuContent, { "$removeSelectedGroup": !!menuState.removeSelectedGroup, children: menuState.filteredGroups.map((group, index) => (jsxRuntime.jsxs(DivWrapperSC$4, { children: [index !== 0 && jsxRuntime.jsx(FISMenuSection, { withDivider: true }), jsxRuntime.jsx(FISMenuSection, { label: group?.groupLabel }), group.items.map((item, idx) => (jsxRuntime.jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => handleItemClick(item), selected: selectedValues?.includes(item.value), type: "select" }, idx)))] }, index))) }), menuState.removeSelectedGroup && (jsxRuntime.jsx(FixedBottomSection, { children: jsxRuntime.jsx(DivWrapperSC$4, { children: menuState.removeSelectedGroup.items.map((item, idx) => (jsxRuntime.jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => onChangeSelected?.([]), type: "select", iconPrefix: jsxRuntime.jsx(RemoveIcon, {}), negative: true }, idx))) }) }))] }))] }) }));
67418
67426
  };
67419
67427
  FISMenuSelect.displayName = "FISMenuSelect";
67420
67428
 
@@ -71209,7 +71217,6 @@ const DivHeaderCellContainerSC = styled.div `
71209
71217
 
71210
71218
  .cell-content {
71211
71219
  display: flex;
71212
- align-items: center;
71213
71220
  justify-content: ${(props) => props.$align === "right" ? "flex-end" : "space-between"};
71214
71221
  min-height: ${getTheme("com/segmented/item/active-surface/size-sm/height")};
71215
71222
  width: 100%;
@@ -71238,6 +71245,17 @@ const DivHeaderCellContainerSC = styled.div `
71238
71245
  }};
71239
71246
  }
71240
71247
 
71248
+ .right-component-father {
71249
+ display: flex;
71250
+ justify-content: center;
71251
+ width: ${getTheme("com/button/size-xs/icon/size-icon")};
71252
+ height: ${getTheme("com/button/size-xs/icon/size-icon")};
71253
+ .right-component-child {
71254
+ flex-shrink: 0;
71255
+ align-self: center;
71256
+ }
71257
+ }
71258
+
71241
71259
  ${(props) => {
71242
71260
  if (props.$disabled) {
71243
71261
  return styled.css `
@@ -71262,7 +71280,7 @@ const DivHeaderCellContainerSC = styled.div `
71262
71280
  `;
71263
71281
 
71264
71282
  const FISHeaderCell = React.forwardRef(({ className, textAlign, label, description, rightComponent, disabled, hasRightDivider = true, hasTruncateLabel = false, onlyIcon = false, align = "left", ...rest }, ref) => {
71265
- return (jsxRuntime.jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$align": align, "$onlyIcon": onlyIcon, ...rest, children: jsxRuntime.jsxs("div", { className: "header-cell-content", children: [jsxRuntime.jsxs("div", { className: "cell-content", children: [label && jsxRuntime.jsx("div", { className: "label", children: label }), rightComponent] }), align === "right" ? (jsxRuntime.jsxs("div", { className: "cell-content", children: [description && jsxRuntime.jsx("div", { className: "description", children: description }), jsxRuntime.jsx("span", { children: rightComponent })] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: description && jsxRuntime.jsx("div", { className: "description", children: description }) }))] }) }));
71283
+ return (jsxRuntime.jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$align": align, "$onlyIcon": onlyIcon, ...rest, children: jsxRuntime.jsxs("div", { className: "header-cell-content", children: [jsxRuntime.jsxs("div", { className: "cell-content", children: [label && jsxRuntime.jsx("div", { className: "label", children: label }), jsxRuntime.jsx("div", { className: "right-component-father", children: jsxRuntime.jsx("div", { className: "right-component-child", children: rightComponent }) })] }), jsxRuntime.jsx("div", { className: "cell-content", children: description && jsxRuntime.jsx("div", { className: "description", children: description }) })] }) }));
71266
71284
  });
71267
71285
  FISHeaderCell.displayName = "FISHeaderCell";
71268
71286
 
@@ -71610,7 +71628,6 @@ const DivDateRangeContainerSC = styled.div `
71610
71628
  align-items: flex-start;
71611
71629
  gap: ${getTheme("com/input/vertical-gap")};
71612
71630
  width: 100%;
71613
- padding: ${getTheme("sem/dimension/padding/xl")};
71614
71631
  .ant-picker-range {
71615
71632
  width: 100%;
71616
71633
  border: none;
@@ -73227,15 +73244,19 @@ const DivContainerSC = styled.div `
73227
73244
  }
73228
73245
  `;
73229
73246
 
73230
- const FISSelectItem = React.forwardRef(({ onClickSuffix, onClickPrefix, ...props }, ref) => {
73247
+ const FISSelectItem = React.forwardRef((props, ref) => {
73231
73248
  const { size = "md", iconPrefix, iconSuffix, disabled, activeDropdown, ...rest } = props;
73232
73249
  return (jsxRuntime.jsx(DivContainerSC, { className: classNames({
73233
73250
  iconPrefix: iconPrefix,
73234
- }), "$size": size, children: jsxRuntime.jsxs(DivWrapperSC, { children: [iconPrefix && (jsxRuntime.jsx(DivIconPrefixSC, { "$size": size, children: iconPrefix })), jsxRuntime.jsx(InputSC, { ...rest, ref: ref, disabled: disabled, "$size": size }), iconSuffix && (jsxRuntime.jsx(DivIconSuffixSC, { "$size": size, onClick: onClickSuffix, children: iconSuffix }))] }) }));
73251
+ }), "$size": size, children: jsxRuntime.jsxs(DivWrapperSC, { children: [iconPrefix && (jsxRuntime.jsx(DivIconPrefixSC, { "$size": size, children: iconPrefix })), jsxRuntime.jsx(InputSC, { ...rest, ref: ref, disabled: disabled, "$size": size }), iconSuffix && (jsxRuntime.jsx(DivIconSuffixSC, { "$size": size, children: iconSuffix }))] }) }));
73235
73252
  });
73236
73253
  FISSelectItem.displayName = "FISSelectItem";
73237
73254
 
73238
- const FISSelect = React.forwardRef(({ className, options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, ...restProps }, ref) => {
73255
+ function isMenuSize(value) {
73256
+ return value === "sm" || value === "md";
73257
+ }
73258
+
73259
+ const FISSelect = React.forwardRef(({ className, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, ...restProps }, ref) => {
73239
73260
  const [isOpen, setIsOpen] = React.useState(false);
73240
73261
  const [referenceElement, setReferenceElement] = React.useState(null);
73241
73262
  const [popperElement, setPopperElement] = React.useState(null);
@@ -73296,7 +73317,7 @@ const FISSelect = React.forwardRef(({ className, options, value, disabled = fals
73296
73317
  onChange(newValues);
73297
73318
  }
73298
73319
  }, [multi, onChange, value]);
73299
- return (jsxRuntime.jsxs(DivWrapperSC$1, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsxRuntime.jsx(FISSelectItem, { ...restProps, ref: ref, size: "md", readOnly: true, iconSuffix: isOpen ? jsxRuntime.jsx(ArrowUpIcon, {}) : jsxRuntime.jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen, onClickSuffix: handleToggle }) }), message && (jsxRuntime.jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsxRuntime.jsx(SelectedTagsWrapper, { children: jsxRuntime.jsx(MultipleValue, { options: selectedOptions, onRemove: handleOptionRemove }) })), isOpen && (jsxRuntime.jsx(Portal, { children: jsxRuntime.jsx(DivDropdownMenuSC, { ref: setPopperElement, style: { ...styles.popper, width: referenceElement?.offsetWidth }, ...attributes.popper, children: jsxRuntime.jsx(FISMenuSelect, { groups: options, placeholder: placeholderSearch, loading: loading, multi: multi, selectedValues: multi ? value : value ? [value] : [], onChangeSelected: (values) => {
73320
+ return (jsxRuntime.jsxs(DivWrapperSC$1, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsxRuntime.jsx(FISSelectItem, { ...restProps, ref: ref, size: size, iconSuffix: isOpen ? jsxRuntime.jsx(ArrowUpIcon, {}) : jsxRuntime.jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen }) }), message && (jsxRuntime.jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsxRuntime.jsx(SelectedTagsWrapper, { children: jsxRuntime.jsx(MultipleValue, { options: selectedOptions, onRemove: handleOptionRemove }) })), isOpen && (jsxRuntime.jsx(Portal, { children: jsxRuntime.jsx(DivDropdownMenuSC, { ref: setPopperElement, style: { ...styles.popper, width: referenceElement?.offsetWidth }, ...attributes.popper, children: jsxRuntime.jsx(FISMenuSelect, { size: isMenuSize(size) ? size : "md", groups: options, placeholder: placeholderSearch, loading: loading, multi: multi, selectedValues: multi ? value : value ? [value] : [], onChangeSelected: (values) => {
73300
73321
  if (multi) {
73301
73322
  onChange(values);
73302
73323
  }
@@ -73312,6 +73333,191 @@ const FISSelect = React.forwardRef(({ className, options, value, disabled = fals
73312
73333
  });
73313
73334
  FISSelect.displayName = "FISSelect";
73314
73335
 
73336
+ const useNotification = () => {
73337
+ const context = React.useContext(NotificationContext);
73338
+ if (!context) {
73339
+ throw new Error("useNotification must be used within a NotificationProvider");
73340
+ }
73341
+ return context;
73342
+ };
73343
+
73344
+ const useToast = () => {
73345
+ const context = React.useContext(ToastContext);
73346
+ if (!context) {
73347
+ throw new Error("useToast must be used within a ToastProvider");
73348
+ }
73349
+ return context;
73350
+ };
73351
+
73352
+ const PaginationAntdSC = styled(Pagination) `
73353
+ display: flex;
73354
+ align-items: center;
73355
+ gap: ${getTheme("com/pagination/record-number/horizontal-gap")};
73356
+
73357
+ .ant-pagination-item {
73358
+ ${getTheme("Paragraph/Sm")}
73359
+ height: ${getTheme("sem/dimension/size/component/2xs")};
73360
+ min-width: ${getTheme("com/pagination/navigation/page-number/min-with")};
73361
+ border-radius: ${getTheme("com/pagination/navigation/page-number/corner-radius")};
73362
+ display: flex;
73363
+ justify-content: center;
73364
+ align-items: center;
73365
+
73366
+ a {
73367
+ color: ${getTheme("sem/color/text/neutral/sub")} !important;
73368
+ }
73369
+
73370
+ &:hover {
73371
+ background-color: ${getTheme("com/pagination/navigation/page-number/background/background-color/hover")} !important;
73372
+
73373
+ a {
73374
+ color: ${getTheme("com/pagination/navigation/page-number/label/color-text/hover")} !important;
73375
+ }
73376
+ }
73377
+
73378
+ &:active {
73379
+ background-color: ${getTheme("com/pagination/navigation/page-number/background/background-color/pressed")} !important;
73380
+
73381
+ a {
73382
+ color: ${getTheme("com/pagination/navigation/page-number/label/color-text/pressed")} !important;
73383
+ }
73384
+ }
73385
+ }
73386
+
73387
+ .ant-pagination-item:focus-visible,
73388
+ .ant-pagination-next:focus-visible,
73389
+ .ant-pagination-prev:focus-visible {
73390
+ box-shadow:
73391
+ 0px 0px 0px ${getTheme("sem/dimension/stroke-width/divider/lg")}
73392
+ ${getTheme("com/focus-mark/color-gap-spacing")},
73393
+ 0px 0px 0px 4px ${getTheme("com/focus-mark/color-stroke")} !important;
73394
+ outline: none !important;
73395
+ background: ${getTheme("com/pagination/navigation/page-number/background/background-color/active")};
73396
+ }
73397
+
73398
+ .ant-pagination-item-active {
73399
+ border: none !important;
73400
+ background-color: ${getTheme("com/pagination/navigation/page-number/background/background-color/active")};
73401
+
73402
+ a {
73403
+ color: ${getTheme("com/pagination/navigation/page-number/label/color-text/active")} !important;
73404
+ }
73405
+ }
73406
+
73407
+ &.ant-pagination-disabled {
73408
+ .ant-pagination-item {
73409
+ background-color: transparent !important;
73410
+ color: ${getTheme("com/pagination/navigation/page-number/disable/label/color-text/default")} !important;
73411
+ }
73412
+ }
73413
+
73414
+ .ant-pagination-next.ant-pagination-disabled,
73415
+ .ant-pagination-prev.ant-pagination-disabled,
73416
+ &.ant-pagination-disabled .ant-pagination-next,
73417
+ &.ant-pagination-disabled .ant-pagination-prev {
73418
+ color: ${getTheme("com/button/disable/icon-color")} !important;
73419
+ border-color: ${getTheme("com/button/disable/stroke-color")} !important;
73420
+ background-color: transparent !important;
73421
+ }
73422
+
73423
+ &.ant-pagination-disabled .ant-pagination-item-active {
73424
+ background-color: ${getTheme("com/pagination/navigation/page-number/disable/background/background-color/active")} !important;
73425
+ color: ${getTheme("com/pagination/navigation/page-number/disable/label/color-text/active")} !important;
73426
+ }
73427
+
73428
+ .ant-pagination-options {
73429
+ margin-inline-start: ${getTheme("com/pagination/horizontal-gap")} !important;
73430
+ }
73431
+
73432
+ ${({ $minimize }) => $minimize &&
73433
+ styled.css `
73434
+ gap: 0;
73435
+ .ant-pagination-item,
73436
+ .ant-pagination-jump-next,
73437
+ .ant-pagination-jump-prev {
73438
+ display: none;
73439
+ }
73440
+
73441
+ .ant-pagination-next {
73442
+ border-top-left-radius: 0px;
73443
+ border-bottom-left-radius: 0px;
73444
+ }
73445
+
73446
+ .ant-pagination-prev {
73447
+ border-top-right-radius: 0px;
73448
+ border-bottom-right-radius: 0px;
73449
+ border-right: none;
73450
+ }
73451
+ `}
73452
+ `;
73453
+ const DivPaginationContainer = styled.div `
73454
+ display: flex;
73455
+ align-items: center;
73456
+ justify-content: space-between;
73457
+ `;
73458
+ const DivPaginationContent = styled.div `
73459
+ display: flex;
73460
+ align-items: center;
73461
+ gap: ${getTheme("com/pagination/horizontal-gap")};
73462
+ `;
73463
+ const SpanTotalSC = styled.span `
73464
+ display: inline-flex;
73465
+ align-items: center;
73466
+ gap: ${getTheme("sem/dimension/gap/xs")};
73467
+
73468
+ ${getTheme("Paragraph/Sm")};
73469
+ color: ${getTheme("com/pagination/range-number/label/color-text")} !important;
73470
+ `;
73471
+ const SelectPageSizeSC = styled(FISSelect) `
73472
+ // fixed
73473
+ width: 100px;
73474
+ `;
73475
+
73476
+ const LIMIT_DEFAULT = 10;
73477
+ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minimize, recordCounted, onIconPageRecordClick, showTotal, ...rest }) => {
73478
+ const rangeRecords = React.useMemo(() => {
73479
+ return [(current - 1) * pageSize + 1, current * pageSize];
73480
+ }, [current, pageSize, total]);
73481
+ const defaultShowTotal = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["Hi\u1EC3n th\u1ECB ", rangeRecords[0], "-", rangeRecords[1], recordCounted ? (`trong ${total} bản ghi`) : (jsxRuntime.jsx(FISIconButton, { size: "xs", icon: jsxRuntime.jsx(InfoIcon, {}), variant: "tertiary-invisible", onClick: onIconPageRecordClick }))] }));
73482
+ // Merge the default props with the provided props
73483
+ const mergedProps = {
73484
+ size: "small",
73485
+ showSizeChanger: false,
73486
+ showQuickJumper: false,
73487
+ responsive: true,
73488
+ showLessItems: true,
73489
+ locale: {
73490
+ items_per_page: "/ trang",
73491
+ },
73492
+ total,
73493
+ current,
73494
+ pageSize,
73495
+ ...rest,
73496
+ };
73497
+ const itemRender = (_page, type, originalElement) => {
73498
+ if (type === "prev") {
73499
+ return (jsxRuntime.jsx(FISIconButton, { size: "xs", icon: jsxRuntime.jsx(ChevronLeftIcon, {}), variant: "tertiary", disabled: current === 1 }));
73500
+ }
73501
+ if (type === "next") {
73502
+ return (jsxRuntime.jsx(FISIconButton, { size: "xs", icon: jsxRuntime.jsx(ChevronRightIcon, {}), variant: "tertiary", disabled: current * pageSize >= total }));
73503
+ }
73504
+ return originalElement;
73505
+ };
73506
+ return (jsxRuntime.jsxs(DivPaginationContainer, { children: [jsxRuntime.jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxRuntime.jsxs(DivPaginationContent, { children: [jsxRuntime.jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsxRuntime.jsx(SelectPageSizeSC, { size: "xs", options: [
73507
+ {
73508
+ groupLabel: "",
73509
+ items: (rest.pageSizeOptions || [10, 20, 50, 100]).map((size) => ({
73510
+ label: `${size} ${rest.locale?.items_per_page || mergedProps.locale?.items_per_page}`,
73511
+ value: String(size),
73512
+ })),
73513
+ },
73514
+ ], value: String(pageSize), multi: false, onChange: (value) => {
73515
+ if (rest.onShowSizeChange) {
73516
+ rest.onShowSizeChange(Number(value), pageSize);
73517
+ }
73518
+ } })] })] }));
73519
+ };
73520
+
73315
73521
  exports.FISAlertBanner = FISAlertBanner;
73316
73522
  exports.FISAvatar = FISAvatar;
73317
73523
  exports.FISBadge = FISBadge;
@@ -73322,9 +73528,11 @@ exports.FISCheckbox = FISCheckbox;
73322
73528
  exports.FISCheckboxGroup = FISCheckboxGroup;
73323
73529
  exports.FISChipButton = FISChipButton;
73324
73530
  exports.FISCollapse = FISCollapse;
73531
+ exports.FISColumnCell = FISColumnCell;
73325
73532
  exports.FISCombobox = FISCombobox;
73326
73533
  exports.FISDateRange = FISDateRange;
73327
73534
  exports.FISDivider = FISDivider;
73535
+ exports.FISHeaderCell = FISHeaderCell;
73328
73536
  exports.FISIconButton = FISIconButton;
73329
73537
  exports.FISInputArea = FISInputArea;
73330
73538
  exports.FISInputDate = FISInputDate;
@@ -73354,6 +73562,9 @@ exports.FISTableHeader = FISHeaderCell;
73354
73562
  exports.FISThemeProvider = FISThemeProvider;
73355
73563
  exports.FISToast = FISToast;
73356
73564
  exports.FISTooltip = FISTooltip;
73565
+ exports.Pagination = FISPagination;
73357
73566
  exports.SegmentedPanelItem = SegmentedPanelItem;
73358
73567
  exports.TabPanelItem = TabPanelItem;
73568
+ exports.useNotification = useNotification;
73569
+ exports.useToast = useToast;
73359
73570
  //# sourceMappingURL=index.js.map