@ctlyst.id/internal-ui 5.4.6 → 5.4.7

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.mts CHANGED
@@ -15,9 +15,8 @@ import { GroupBase, Props as Props$1, DropdownIndicatorProps, ClearIndicatorProp
15
15
  import { AsyncPaginateProps } from 'react-select-async-paginate';
16
16
  import { AsyncCreatableProps } from 'react-select/async-creatable';
17
17
  import { CreatableProps } from 'react-select/creatable';
18
- import { ToastOptions } from 'react-toastify';
18
+ import { Id, ToastOptions, IconProps } from 'react-toastify';
19
19
  export { ToastContainer } from 'react-toastify';
20
- import { Id, ToastIcon } from 'react-toastify/dist/types';
21
20
  import { FileError, FileRejection } from 'react-dropzone';
22
21
  import * as axios from 'axios';
23
22
  import { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
@@ -764,6 +763,7 @@ interface TimeInputProps {
764
763
  }
765
764
  declare const TimeInput: _chakra_ui_react.ComponentWithAs<"div", TimeInputProps>;
766
765
 
766
+ type ToastIcon = false | ((props: IconProps) => React.ReactNode) | React.ReactElement<IconProps>;
767
767
  interface CustomToastOptions extends Omit<ToastOptions, 'icon'> {
768
768
  icon?: ToastIcon;
769
769
  link?: {
package/dist/index.d.ts CHANGED
@@ -15,9 +15,8 @@ import { GroupBase, Props as Props$1, DropdownIndicatorProps, ClearIndicatorProp
15
15
  import { AsyncPaginateProps } from 'react-select-async-paginate';
16
16
  import { AsyncCreatableProps } from 'react-select/async-creatable';
17
17
  import { CreatableProps } from 'react-select/creatable';
18
- import { ToastOptions } from 'react-toastify';
18
+ import { Id, ToastOptions, IconProps } from 'react-toastify';
19
19
  export { ToastContainer } from 'react-toastify';
20
- import { Id, ToastIcon } from 'react-toastify/dist/types';
21
20
  import { FileError, FileRejection } from 'react-dropzone';
22
21
  import * as axios from 'axios';
23
22
  import { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
@@ -764,6 +763,7 @@ interface TimeInputProps {
764
763
  }
765
764
  declare const TimeInput: _chakra_ui_react.ComponentWithAs<"div", TimeInputProps>;
766
765
 
766
+ type ToastIcon = false | ((props: IconProps) => React.ReactNode) | React.ReactElement<IconProps>;
767
767
  interface CustomToastOptions extends Omit<ToastOptions, 'icon'> {
768
768
  icon?: ToastIcon;
769
769
  link?: {
package/dist/index.js CHANGED
@@ -5905,7 +5905,7 @@ var styles_default2 = Styles2;
5905
5905
  var import_jsx_runtime65 = require("react/jsx-runtime");
5906
5906
  var CustomCloseButton = (props) => {
5907
5907
  const { closeToast } = props;
5908
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
5908
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: () => closeToast(), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
5909
5909
  };
5910
5910
  var DEFAULT_OPTIONS = {
5911
5911
  position: "top-right",
@@ -5939,7 +5939,7 @@ var useToast = () => {
5939
5939
  const content = (icon, message, link) => {
5940
5940
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
5941
5941
  /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(styles_default2, {}),
5942
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, children: [
5942
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
5943
5943
  /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { alignItems: "center", children: [
5944
5944
  icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
5945
5945
  /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.chakra.span, { noOfLines: 2, children: message })